Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Tracing/Tracer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ extension Tracer {
// ==== ----------------------------------------------------------------------------------------------------------------
// MARK: Starting spans: Task-local Baggage propagation

#if swift(>=5.5)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Tracer {
/// Execute the given operation within a newly created `Span`,
/// started as a child of the currently stored task local `Baggage.current` or as a root span if `nil`.
Expand Down
20 changes: 10 additions & 10 deletions Tests/TracingTests/TracerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ final class TracerTests: XCTestCase {
}

func testWithSpan_automaticBaggagePropagation_sync() throws {
#if swift(>=5.5)
guard #available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) else {
#if swift(>=5.5) && canImport(_Concurrency)
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
throw XCTSkip("Task locals are not supported on this platform.")
}

Expand Down Expand Up @@ -127,8 +127,8 @@ final class TracerTests: XCTestCase {
}

func testWithSpan_automaticBaggagePropagation_sync_throws() throws {
#if swift(>=5.5)
guard #available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) else {
#if swift(>=5.5) && canImport(_Concurrency)
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
throw XCTSkip("Task locals are not supported on this platform.")
}

Expand Down Expand Up @@ -157,8 +157,8 @@ final class TracerTests: XCTestCase {
}

func testWithSpan_automaticBaggagePropagation_async() throws {
#if swift(>=5.5)
guard #available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) else {
#if swift(>=5.5) && canImport(_Concurrency)
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
throw XCTSkip("Task locals are not supported on this platform.")
}

Expand Down Expand Up @@ -188,8 +188,8 @@ final class TracerTests: XCTestCase {
}

func testWithSpan_automaticBaggagePropagation_async_throws() throws {
#if swift(>=5.5)
guard #available(macOS 12, iOS 15, tvOS 15, watchOS 8, *) else {
#if swift(>=5.5) && canImport(_Concurrency)
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
throw XCTSkip("Task locals are not supported on this platform.")
}

Expand Down Expand Up @@ -219,8 +219,8 @@ final class TracerTests: XCTestCase {
#endif
}

#if swift(>=5.5)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
/// Helper method to execute async operations until we can use async tests (currently incompatible with the generated LinuxMain file).
/// - Parameter operation: The operation to test.
func testAsync(_ operation: @escaping () async throws -> Void) rethrows {
Expand Down