@@ -46,7 +46,7 @@ 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.
@@ -64,13 +64,14 @@ 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 ) { }
72+
73+ @inlinable
74+ mutating func failRequestSpanAsCancelled( ) { }
7475
7576 @inlinable
7677 mutating func endRequestSpan( response: HTTPResponseHead ) { }
@@ -81,12 +82,9 @@ extension RequestBag.LoopBoundState {
8182extension RequestBag . LoopBoundState {
8283 // typealias TracerType = Tracer
8384
84- mutating func startRequestSpan( tracer: Any ? ) {
85+ mutating func startRequestSpan< T > ( tracer: T ? ) {
8586 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) " )
87+ let tracer = tracer as! ( any Tracer ) ? else {
9088 return
9189 }
9290
0 commit comments