File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
- import Dispatch
15
+ @ preconcurrency import struct Dispatch. DispatchWallTime
16
16
@_exported import InstrumentationBaggage
17
17
18
18
/// A `Span` represents an interval from the start of an operation to its end, along with additional metadata included
@@ -233,8 +233,13 @@ public enum SpanAttribute: Equatable {
233
233
case string( String )
234
234
case stringArray( [ String ] )
235
235
236
+ #if swift(>=5.6)
237
+ case stringConvertible( CustomStringConvertible & Sendable )
238
+ case stringConvertibleArray( [ CustomStringConvertible & Sendable ] )
239
+ #else
236
240
case stringConvertible( CustomStringConvertible )
237
241
case stringConvertibleArray( [ CustomStringConvertible ] )
242
+ #endif
238
243
239
244
#if swift(>=5.2)
240
245
// older swifts get confused and can't resolve if we mean the `case int(Int64)` or any of those overloads
@@ -666,9 +671,9 @@ public protocol _SwiftTracingSendableSpan {}
666
671
667
672
#if compiler(>=5.6)
668
673
extension SpanAttributes : Sendable { }
669
- extension SpanAttribute : @ unchecked Sendable { }
674
+ extension SpanAttribute : Sendable { } // @unchecked because some payloads are CustomStringConvertible
670
675
extension SpanStatus : Sendable { }
671
- extension SpanEvent : @ unchecked Sendable { } // unchecked because of DispatchWallTime
676
+ extension SpanEvent : Sendable { }
672
677
extension SpanKind : Sendable { }
673
678
extension SpanStatus . Code : Sendable { }
674
679
extension SpanLink : Sendable { }
You can’t perform that action at this time.
0 commit comments