-
Notifications
You must be signed in to change notification settings - Fork 1
Submit Swift test executions through OpenTelemetry #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f6afffb
Isolate Swift default collector test
pda 049b3f0
feat(swift): submit test executions through OTLP
pda f831928
docs(swift): record OTLP-only execution export
pda 8fdc6e4
fix(swift): support the Swift 6.0 CI toolchain
pda 9ce042b
fix(swift): use Swift 6.0-compatible OTel releases
pda 7a0ebc0
fix(swift): propagate the Swift 6.0 metrics pin
pda d6e5fbd
fix(swift): wait for OTLP endpoint acceptance
pda 3021477
Keep Swift 6.0 dependency compatibility
pda 67549ec
Support Swift 5.10 consumers
pda afe4d3d
Harden Swift OTLP integration across platforms
pda 78830ab
Handle late OpenTelemetry provider registration
pda f0984f4
Test the supported Swift 5.10 toolchain
pda 5af9ae6
Prepare Swift collector for 2.0.0 beta
pda a76e02b
Warn when the legacy analytics endpoint is ignored
pda a1331a5
Back off failed Swift execution exports
pda d9246b8
Improve Swift export backoff diagnostics
pda 9e0e9d8
Isolate Swift OTLP endpoint credentials
pda 988ca42
Scope Swift OTLP protocol configuration
pda 043cae8
Align Swift OTLP metadata with Ruby
pda e600b30
Avoid Swift optimizer stall in span setup
pda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,45 @@ | ||
| // swift-tools-version: 5.7.1 | ||
| // swift-tools-version: 5.10 | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "BuildkiteTestCollector", | ||
| platforms: [ | ||
| .macOS("10.15"), | ||
| .macOS("12.0"), | ||
| .iOS("13.0"), | ||
| .tvOS("13.0"), | ||
| .watchOS("6.0") | ||
| ], | ||
| products: [ | ||
| .library(name: "BuildkiteTestCollector", targets: ["BuildkiteTestCollector"]) | ||
| ], | ||
| dependencies: [ | ||
| // OpenTelemetry 2.2.1 and later require a Swift 6.1-only grpc-swift release. | ||
| .package(url: "https://github.com/open-telemetry/opentelemetry-swift", exact: "2.2.0"), | ||
| .package(url: "https://github.com/open-telemetry/opentelemetry-swift-core", exact: "2.2.0"), | ||
| // Keep Swift 5.10 compatibility; swift-metrics 2.8 requires Swift 6.0. | ||
| .package(url: "https://github.com/apple/swift-metrics", exact: "2.7.1") | ||
|
buildsworth-bk-app[bot] marked this conversation as resolved.
|
||
| ], | ||
| targets: [ | ||
| .target(name: "BuildkiteTestCollector", dependencies: ["Core", "Loader"]), | ||
| .target(name: "Core"), | ||
| .target( | ||
| name: "Core", | ||
| dependencies: [ | ||
| .product(name: "OpenTelemetryProtocolExporterHTTP", package: "opentelemetry-swift"), | ||
| .product(name: "OpenTelemetrySdk", package: "opentelemetry-swift-core"), | ||
| .product(name: "CoreMetrics", package: "swift-metrics") | ||
| ] | ||
| ), | ||
| .target(name: "Loader"), | ||
| .testTarget(name: "BuildkiteTestCollectorTests", dependencies: ["BuildkiteTestCollector"]), | ||
| .testTarget(name: "CoreTests", dependencies: ["Core"]) | ||
| ] | ||
| .testTarget( | ||
| name: "CoreTests", | ||
| dependencies: [ | ||
| "Core", | ||
| .product(name: "InMemoryExporter", package: "opentelemetry-swift"), | ||
| .product(name: "OpenTelemetrySdk", package: "opentelemetry-swift-core") | ||
| ] | ||
| ) | ||
| ], | ||
| swiftLanguageVersions: [.v5] | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
test-collector-swift/Sources/BuildkiteTestCollector/TestCollector.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,13 @@ | ||
| import Core | ||
|
|
||
| public enum TestCollector { | ||
| /// The base URL for the Buildkite Test Engine API. | ||
| /// The default OpenTelemetry traces endpoint for Buildkite Test Engine. | ||
| public static var endpoint: String { | ||
| Core.TestCollector.endpoint | ||
| } | ||
|
|
||
| @available(*, deprecated, renamed: "endpoint") | ||
| public static var baseURL: String { | ||
| Core.TestCollector.baseURL | ||
| self.endpoint | ||
| } | ||
| } |
35 changes: 0 additions & 35 deletions
35
test-collector-swift/Sources/Core/ApiClient/ApiClient+Live.swift
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
test-collector-swift/Sources/Core/ApiClient/ApiClient.swift
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
test-collector-swift/Sources/Core/ApiClient/ApiSession.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.