@@ -46,12 +46,12 @@ protocol _TracingSupportOperations {
4646 // associatedtype TracerType
4747
4848 /// Starts the "overall" Span that encompases the beginning of a request until receipt of the head part of the response.
49- mutating func startRequestSpan( tracer: Any ? )
49+ mutating func startRequestSpan< T > ( tracer: T ? )
5050
5151 /// Fails the active overall span given some internal error, e.g. timeout, pool shutdown etc.
5252 /// This is not to be used for failing a span given a failure status coded HTTPResponse.
5353 mutating func failRequestSpan( error: any Error )
54- mutating func failRequestSpanAsCancelled( ) // because CancellationHandler availability...
54+ mutating func failRequestSpanAsCancelled( ) // because CancellationHandler availability...
5555
5656 /// Ends the active overall span upon receipt of the response head.
5757 ///
@@ -64,14 +64,15 @@ extension RequestBag.LoopBoundState: _TracingSupportOperations {}
6464#if !TracingSupport
6565/// Operations used to start/end spans at apropriate times from the Request lifecycle.
6666extension RequestBag . LoopBoundState {
67- typealias TracerType = HTTPClientTracingSupportTracerType
68-
6967 @inlinable
70- mutating func startRequestSpan( tracer: Any ? ) { }
68+ mutating func startRequestSpan< T > ( tracer: T ? ) { }
7169
7270 @inlinable
7371 mutating func failRequestSpan( error: any Error ) { }
7472
73+ @inlinable
74+ mutating func failRequestSpanAsCancelled( ) { }
75+
7576 @inlinable
7677 mutating func endRequestSpan( response: HTTPResponseHead ) { }
7778}
@@ -81,12 +82,10 @@ extension RequestBag.LoopBoundState {
8182extension RequestBag . LoopBoundState {
8283 // typealias TracerType = Tracer
8384
84- mutating func startRequestSpan( tracer: Any ? ) {
85- guard #available( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) ,
86- let tracer = tracer as? ( any Tracer ) ? ,
87- let tracer else {
88- // print("[swift][\(#fileID):\(#line)] MISSING TRACER: \(tracer)")
89- fatalError ( " [swift][ \( #fileID) : \( #line) ] MISSING TRACER: \( tracer) " )
85+ mutating func startRequestSpan< T> ( tracer: T ? ) {
86+ guard #available( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) ,
87+ let tracer = tracer as! ( any Tracer ) ?
88+ else {
9089 return
9190 }
9291
0 commit comments