Skip to content

Commit 813f2c7

Browse files
author
Ignacio Bonafonte
committed
Replace SpanBuilder by Span in callback
1 parent 6912892 commit 813f2c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/Instrumentation/URLSession/URLSessionConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct URLSessionConfiguration {
2626
shouldInstrument: ((URLRequest) -> (Bool)?)? = nil,
2727
nameSpan: ((URLRequest) -> (String)?)? = nil,
2828
shouldInjectTracingHeaders: ((inout URLRequest) -> (Bool)?)? = nil,
29-
createdRequest: ((URLRequest, SpanBuilder) -> Void)? = nil,
29+
createdRequest: ((URLRequest, Span) -> Void)? = nil,
3030
receivedResponse: ((URLResponse, DataOrFile?, Span) -> Void)? = nil,
3131
receivedError: ((Error, DataOrFile?, HTTPStatus, Span) -> Void)? = nil)
3232
{
@@ -58,7 +58,7 @@ public struct URLSessionConfiguration {
5858
public var nameSpan: ((URLRequest) -> (String)?)?
5959

6060
/// Called before the span is created, it allows to add extra information to the Span through the builder
61-
public var createdRequest: ((URLRequest, SpanBuilder) -> Void)?
61+
public var createdRequest: ((URLRequest, Span) -> Void)?
6262

6363
/// Called before the span is ended, it allows to add extra information to the Span
6464
public var receivedResponse: ((URLResponse, DataOrFile?, Span) -> Void)?

Sources/Instrumentation/URLSession/URLSessionLogger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class URLSessionLogger {
7171
returnRequest = instrumentedRequest(for: request, span: span, instrumentation: instrumentation)
7272
}
7373

74-
instrumentation.configuration.createdRequest?(returnRequest ?? request, spanBuilder)
74+
instrumentation.configuration.createdRequest?(returnRequest ?? request, span)
7575

7676
return returnRequest ?? request
7777
}

0 commit comments

Comments
 (0)