@@ -100,7 +100,7 @@ public func startSpan(
100
100
InstrumentationSystem . legacyTracer. startAnySpan (
101
101
operationName,
102
102
at: DefaultTracerClock . now,
103
- context: baggage ( ) ,
103
+ context: context ( ) ,
104
104
ofKind: kind,
105
105
function: function,
106
106
file: fileID,
@@ -112,12 +112,12 @@ public func startSpan(
112
112
/// Start a new ``Span`` using the global bootstrapped tracer reimplementation.
113
113
///
114
114
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
115
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
116
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
115
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
116
+ /// to pick up the task-local context is prevented. This can be useful when we know that
117
117
/// we're about to start a top-level span, or if a span should be started from a different,
118
118
/// stored away previously,
119
119
///
120
- /// - Note: Prefer ``withSpan(_:baggage :ofKind:at:function:file:line:_:)-4o2b`` to start
120
+ /// - Note: Prefer ``withSpan(_:context :ofKind:at:function:file:line:_:)-4o2b`` to start
121
121
/// a span as it automatically takes care of ending the span, and recording errors when thrown.
122
122
/// Use `startSpan` iff you need to pass the span manually to a different
123
123
/// location in your source code to end it.
@@ -127,7 +127,7 @@ public func startSpan(
127
127
///
128
128
/// - Parameters:
129
129
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
130
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
130
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
131
131
/// - kind: The ``SpanKind`` of the new ``Span``.
132
132
/// - instant: the time instant at which the span started
133
133
/// - function: The function name in which the span was started
@@ -136,7 +136,7 @@ public func startSpan(
136
136
@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
137
137
public func startSpan(
138
138
_ operationName: String ,
139
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
139
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
140
140
ofKind kind: SpanKind = . internal,
141
141
at instant: @autoclosure ( ) -> some TracerInstant = DefaultTracerClock . now,
142
142
function: String = #function,
@@ -148,7 +148,7 @@ public func startSpan(
148
148
InstrumentationSystem . tracer. startAnySpan (
149
149
operationName,
150
150
at: instant ( ) ,
151
- baggage : baggage ( ) ,
151
+ context : context ( ) ,
152
152
ofKind: kind,
153
153
function: function,
154
154
file: fileID,
@@ -163,8 +163,8 @@ public func startSpan(
163
163
/// including recording the `error` in case the operation throws.
164
164
///
165
165
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
166
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
167
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
166
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
167
+ /// to pick up the task-local context is prevented. This can be useful when we know that
168
168
/// we're about to start a top-level span, or if a span should be started from a different,
169
169
/// stored away previously,
170
170
///
@@ -174,7 +174,7 @@ public func startSpan(
174
174
/// - Parameters:
175
175
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
176
176
/// - instant: the time instant at which the span started
177
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
177
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
178
178
/// - kind: The ``SpanKind`` of the new ``Span``.
179
179
/// - function: The function name in which the span was started
180
180
/// - fileID: The `fileID` where the span was started.
@@ -186,7 +186,7 @@ public func startSpan(
186
186
public func withSpan< T, Instant: TracerInstant > (
187
187
_ operationName: String ,
188
188
at instant: @autoclosure ( ) -> Instant ,
189
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
189
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
190
190
ofKind kind: SpanKind = . internal,
191
191
function: String = #function,
192
192
file fileID: String = #fileID,
@@ -196,7 +196,7 @@ public func withSpan<T, Instant: TracerInstant>(
196
196
try InstrumentationSystem . legacyTracer. withAnySpan (
197
197
operationName,
198
198
at: DefaultTracerClock . now,
199
- baggage : baggage ( ) ,
199
+ context : context ( ) ,
200
200
ofKind: kind,
201
201
function: function,
202
202
file: fileID,
@@ -210,8 +210,8 @@ public func withSpan<T, Instant: TracerInstant>(
210
210
/// including recording the `error` in case the operation throws.
211
211
///
212
212
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
213
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
214
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
213
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
214
+ /// to pick up the task-local context is prevented. This can be useful when we know that
215
215
/// we're about to start a top-level span, or if a span should be started from a different,
216
216
/// stored away previously,
217
217
///
@@ -220,7 +220,7 @@ public func withSpan<T, Instant: TracerInstant>(
220
220
///
221
221
/// - Parameters:
222
222
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
223
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
223
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
224
224
/// - kind: The ``SpanKind`` of the new ``Span``.
225
225
/// - function: The function name in which the span was started
226
226
/// - fileID: The `fileID` where the span was started.
@@ -231,7 +231,7 @@ public func withSpan<T, Instant: TracerInstant>(
231
231
@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
232
232
public func withSpan< T> (
233
233
_ operationName: String ,
234
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
234
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
235
235
ofKind kind: SpanKind = . internal,
236
236
function: String = #function,
237
237
file fileID: String = #fileID,
@@ -241,7 +241,7 @@ public func withSpan<T>(
241
241
try InstrumentationSystem . legacyTracer. withAnySpan (
242
242
operationName,
243
243
at: DefaultTracerClock . now,
244
- baggage : baggage ( ) ,
244
+ context : context ( ) ,
245
245
ofKind: kind,
246
246
function: function,
247
247
file: fileID,
@@ -257,8 +257,8 @@ public func withSpan<T>(
257
257
/// including recording the `error` in case the operation throws.
258
258
///
259
259
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
260
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
261
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
260
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
261
+ /// to pick up the task-local context is prevented. This can be useful when we know that
262
262
/// we're about to start a top-level span, or if a span should be started from a different,
263
263
/// stored away previously,
264
264
///
@@ -268,7 +268,7 @@ public func withSpan<T>(
268
268
/// - Parameters:
269
269
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
270
270
/// - instant: the time instant at which the span started
271
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
271
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
272
272
/// - kind: The ``SpanKind`` of the new ``Span``.
273
273
/// - function: The function name in which the span was started
274
274
/// - fileID: The `fileID` where the span was started.
@@ -278,7 +278,7 @@ public func withSpan<T>(
278
278
/// - Throws: the error the `operation` has thrown (if any)
279
279
public func withSpan< T> (
280
280
_ operationName: String ,
281
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
281
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
282
282
ofKind kind: SpanKind = . internal,
283
283
at instant: @autoclosure ( ) -> some TracerInstant = DefaultTracerClock . now,
284
284
function: String = #function,
@@ -289,7 +289,7 @@ public func withSpan<T>(
289
289
try InstrumentationSystem . legacyTracer. withAnySpan (
290
290
operationName,
291
291
at: instant ( ) ,
292
- baggage : baggage ( ) ,
292
+ context : context ( ) ,
293
293
ofKind: kind,
294
294
function: function,
295
295
file: fileID,
@@ -306,8 +306,8 @@ public func withSpan<T>(
306
306
/// including recording the `error` in case the operation throws.
307
307
///
308
308
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
309
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
310
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
309
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
310
+ /// to pick up the task-local context is prevented. This can be useful when we know that
311
311
/// we're about to start a top-level span, or if a span should be started from a different,
312
312
/// stored away previously,
313
313
///
@@ -317,7 +317,7 @@ public func withSpan<T>(
317
317
/// - Parameters:
318
318
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
319
319
/// - instant: the time instant at which the span started
320
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
320
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
321
321
/// - kind: The ``SpanKind`` of the new ``Span``.
322
322
/// - function: The function name in which the span was started
323
323
/// - fileID: The `fileID` where the span was started.
@@ -329,7 +329,7 @@ public func withSpan<T>(
329
329
public func withSpan< T, Instant: TracerInstant > (
330
330
_ operationName: String ,
331
331
at instant: @autoclosure ( ) -> Instant ,
332
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
332
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
333
333
ofKind kind: SpanKind = . internal,
334
334
function: String = #function,
335
335
file fileID: String = #fileID,
@@ -339,7 +339,7 @@ public func withSpan<T, Instant: TracerInstant>(
339
339
try await InstrumentationSystem . legacyTracer. withAnySpan (
340
340
operationName,
341
341
at: DefaultTracerClock . now,
342
- baggage : baggage ( ) ,
342
+ context : context ( ) ,
343
343
ofKind: kind,
344
344
function: function,
345
345
file: fileID,
@@ -353,8 +353,8 @@ public func withSpan<T, Instant: TracerInstant>(
353
353
/// including recording the `error` in case the operation throws.
354
354
///
355
355
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
356
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
357
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
356
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
357
+ /// to pick up the task-local context is prevented. This can be useful when we know that
358
358
/// we're about to start a top-level span, or if a span should be started from a different,
359
359
/// stored away previously,
360
360
///
@@ -363,7 +363,7 @@ public func withSpan<T, Instant: TracerInstant>(
363
363
///
364
364
/// - Parameters:
365
365
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
366
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
366
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
367
367
/// - kind: The ``SpanKind`` of the new ``Span``.
368
368
/// - function: The function name in which the span was started
369
369
/// - fileID: The `fileID` where the span was started.
@@ -374,7 +374,7 @@ public func withSpan<T, Instant: TracerInstant>(
374
374
@available ( macOS 10 . 15 , iOS 13 , tvOS 13 , watchOS 6 , * ) // for TaskLocal ServiceContext
375
375
public func withSpan< T> (
376
376
_ operationName: String ,
377
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
377
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
378
378
ofKind kind: SpanKind = . internal,
379
379
function: String = #function,
380
380
file fileID: String = #fileID,
@@ -384,7 +384,7 @@ public func withSpan<T>(
384
384
try await InstrumentationSystem . legacyTracer. withAnySpan (
385
385
operationName,
386
386
at: DefaultTracerClock . now,
387
- baggage : baggage ( ) ,
387
+ context : context ( ) ,
388
388
ofKind: kind,
389
389
function: function,
390
390
file: fileID,
@@ -399,8 +399,8 @@ public func withSpan<T>(
399
399
/// including recording the `error` in case the operation throws.
400
400
///
401
401
/// The current task-local `ServiceContext` is picked up and provided to the underlying tracer.
402
- /// It is also possible to pass a specific `baggage ` explicitly, in which case attempting
403
- /// to pick up the task-local baggage is prevented. This can be useful when we know that
402
+ /// It is also possible to pass a specific `context ` explicitly, in which case attempting
403
+ /// to pick up the task-local context is prevented. This can be useful when we know that
404
404
/// we're about to start a top-level span, or if a span should be started from a different,
405
405
/// stored away previously,
406
406
///
@@ -409,7 +409,7 @@ public func withSpan<T>(
409
409
///
410
410
/// - Parameters:
411
411
/// - operationName: The name of the operation being traced. This may be a handler function, database call, ...
412
- /// - baggage : The `ServiceContext` providing information on where to start the new ``Span``.
412
+ /// - context : The `ServiceContext` providing information on where to start the new ``Span``.
413
413
/// - kind: The ``SpanKind`` of the new ``Span``.
414
414
/// - instant: the time instant at which the span started
415
415
/// - function: The function name in which the span was started
@@ -420,7 +420,7 @@ public func withSpan<T>(
420
420
/// - Throws: the error the `operation` has thrown (if any)
421
421
public func withSpan< T> (
422
422
_ operationName: String ,
423
- baggage : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
423
+ context : @autoclosure ( ) -> ServiceContext = . current ?? . topLevel,
424
424
ofKind kind: SpanKind = . internal,
425
425
at instant: @autoclosure ( ) -> some TracerInstant = DefaultTracerClock . now,
426
426
function: String = #function,
@@ -431,7 +431,7 @@ public func withSpan<T>(
431
431
try await InstrumentationSystem . legacyTracer. withAnySpan (
432
432
operationName,
433
433
at: instant ( ) ,
434
- baggage : baggage ( ) ,
434
+ context : context ( ) ,
435
435
ofKind: kind,
436
436
function: function,
437
437
file: fileID,
0 commit comments