Skip to content

Commit 0aa7e5c

Browse files
committed
Use latest swift-tracing commit
1 parent 63d0d44 commit 0aa7e5c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Sources/AsyncHTTPClient/HTTPClient.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public class HTTPClient {
390390
eventLoop eventLoopPreference: EventLoopPreference,
391391
context: LoggingBaggageContextCarrier,
392392
deadline: NIODeadline? = nil) -> Task<Delegate.Response> {
393-
var span = InstrumentationSystem.tracingInstrument.startSpan(named: request.method.rawValue, context: context, ofKind: .client, at: nil)
393+
var span = InstrumentationSystem.tracingInstrument.startSpan(named: request.method.rawValue, context: context, ofKind: .client)
394394
span.attributes.http.method = request.method.rawValue
395395
span.attributes.http.scheme = request.scheme
396396
span.attributes.http.target = request.uri

Tests/AsyncHTTPClientTests/HTTPClientTests.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -2715,16 +2715,18 @@ private final class TestTracer: TracingInstrument {
27152715
named operationName: String,
27162716
context: BaggageContextCarrier,
27172717
ofKind kind: SpanKind,
2718-
at timestamp: Timestamp?
2718+
at timestamp: Timestamp
27192719
) -> Span {
27202720
let span = TestSpan(operationName: operationName,
27212721
kind: kind,
2722-
startTimestamp: timestamp ?? .now(),
2722+
startTimestamp: timestamp,
27232723
context: context.baggage)
27242724
recordedSpans.append(span)
27252725
return span
27262726
}
27272727

2728+
func forceFlush() {}
2729+
27282730
func extract<Carrier, Extractor>(
27292731
_ carrier: Carrier,
27302732
into context: inout BaggageContext,

0 commit comments

Comments
 (0)