@@ -346,22 +346,25 @@ 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.
356359/// - context: The `ServiceContext` providing information on where to start the new ``Span``.
357360/// - kind: The ``SpanKind`` of the new ``Span``.
358- /// - isolation: Defaulted parameter for inheriting isolation of calling actor.
359361/// - function: The function name in which the span was started.
360362/// - fileID: The `fileID` where the span was started.
361363/// - line: The file line where the span was started.
362364/// - operation: The operation that this span measures.
363365/// - Returns: the value returned by `operation`.
364366/// - Throws: the error the `operation` throws (if any).
367+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
365368@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
366369public func withSpan< T, Instant: TracerInstant > (
367370 _ operationName: String ,
@@ -433,11 +436,13 @@ public func withSpan<T>(
433436 }
434437}
435438
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
438439/// Start a new span and automatically end when the operation completes,
439440/// including recording the error in case the operation throws.
440441///
442+ /// @DeprecationSummary {
443+ /// Use ``withSpan(_:at:context:ofKind:isolation:function:file:line:_:)`` instead.
444+ /// }
445+ ///
441446/// - Parameters:
442447/// - operationName: The name of the operation being traced. This may be a handler function, a database call, and so on.
443448/// - context: The `ServiceContext` providing information on where to start the new ``Span``.
@@ -448,6 +453,8 @@ public func withSpan<T>(
448453/// - operation: The operation that this span measures.
449454/// - Returns: the value returned by `operation`.
450455/// - Throws: the error the `operation` throws (if any).
456+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
457+ @available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
451458public func withSpan< T> (
452459 _ operationName: String ,
453460 context: @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
@@ -519,10 +526,13 @@ public func withSpan<T>(
519526 }
520527}
521528
522- @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
523529/// Start a new span and automatically end when the operation completes,
524530/// including recording the error in case the operation throws.
525531///
532+ /// @DeprecationSummary {
533+ /// Use ``withSpan(_:at:context:ofKind:isolation:function:file:line:_:)`` instead.
534+ /// }
535+ ///
526536/// - Parameters:
527537/// - operationName: The name of the operation being traced. This may be a handler function, a database call, and so on.
528538/// - context: The `ServiceContext` providing information on where to start the new ``Span``.
@@ -534,6 +544,7 @@ public func withSpan<T>(
534544/// - operation: The operation that this span measures.
535545/// - Returns: the value returned by `operation`.
536546/// - Throws: the error the `operation` throws (if any).
547+ @_disfavoredOverload @available ( * , deprecated, message: " Prefer #isolation version of this API " )
537548@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * )
538549public func withSpan< T> (
539550 _ operationName: String ,
0 commit comments