Skip to content

Commit 9ffb95e

Browse files
committed
[PATCH] [bug] Fix ignored at argument in two instances of
`withSpan` In two cases, the signature for `withSpan` included the `at` parameter to override the starting timestamp on the span, but it was being ignored and `DefaultTracerClock.now` was being used instead.
1 parent 61c272f commit 9ffb95e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Tracing/Tracer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public func withSpan<T, Instant: TracerInstant>(
195195
) rethrows -> T {
196196
try InstrumentationSystem.legacyTracer.withAnySpan(
197197
operationName,
198-
at: DefaultTracerClock.now,
198+
at: instant(),
199199
context: context(),
200200
ofKind: kind,
201201
function: function,
@@ -339,7 +339,7 @@ public func withSpan<T, Instant: TracerInstant>(
339339
) async rethrows -> T {
340340
try await InstrumentationSystem.legacyTracer.withAnySpan(
341341
operationName,
342-
at: DefaultTracerClock.now,
342+
at: instant(),
343343
context: context(),
344344
ofKind: kind,
345345
function: function,

0 commit comments

Comments
 (0)