@@ -346,10 +346,13 @@ public func withSpan<T, Instant: TracerInstant>(
346346 }
347347}
348348
349- @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
350349/// Start a new span and automatically end when the operation completes,
351350/// including recording the error in case the operation throws.
352351///
352+ /// @DeprecationSummary {
353+ /// Use ``withSpan(_:at:context:ofKind:isolation:function:file:line:_:)`` instead.
354+ /// }
355+ ///
353356/// - Parameters:
354357/// - operationName: The name of the operation being traced. This may be a handler function, a database call, and so on.
355358/// - instant: The time instant at which the span started.
@@ -362,6 +365,7 @@ public func withSpan<T, Instant: TracerInstant>(
362365/// - operation: The operation that this span measures.
363366/// - Returns: the value returned by `operation`.
364367/// - Throws: the error the `operation` throws (if any).
368+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
365369@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
366370public func withSpan< T, Instant: TracerInstant > (
367371 _ operationName: String ,
@@ -433,11 +437,13 @@ public func withSpan<T>(
433437 }
434438}
435439
436- @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
437- @available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
438440/// Start a new span and automatically end when the operation completes,
439441/// including recording the error in case the operation throws.
440442///
443+ /// @DeprecationSummary {
444+ /// Use ``withSpan(_:at:context:ofKind:isolation:function:file:line:_:)`` instead.
445+ /// }
446+ ///
441447/// - Parameters:
442448/// - operationName: The name of the operation being traced. This may be a handler function, a database call, and so on.
443449/// - context: The `ServiceContext` providing information on where to start the new ``Span``.
@@ -448,6 +454,8 @@ public func withSpan<T>(
448454/// - operation: The operation that this span measures.
449455/// - Returns: the value returned by `operation`.
450456/// - Throws: the error the `operation` throws (if any).
457+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
458+ @available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
451459public func withSpan< T> (
452460 _ operationName: String ,
453461 context: @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
@@ -519,10 +527,13 @@ public func withSpan<T>(
519527 }
520528}
521529
522- @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
523530/// Start a new span and automatically end when the operation completes,
524531/// including recording the error in case the operation throws.
525532///
533+ /// @DeprecationSummary {
534+ /// Use ``withSpan(_:at:context:ofKind:isolation:function:file:line:_:)`` instead.
535+ /// }
536+ ///
526537/// - Parameters:
527538/// - operationName: The name of the operation being traced. This may be a handler function, a database call, and so on.
528539/// - context: The `ServiceContext` providing information on where to start the new ``Span``.
@@ -534,6 +545,7 @@ public func withSpan<T>(
534545/// - operation: The operation that this span measures.
535546/// - Returns: the value returned by `operation`.
536547/// - Throws: the error the `operation` throws (if any).
548+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
537549@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * )
538550public func withSpan< T> (
539551 _ operationName: String ,
0 commit comments