You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Callback to customize Spans in URLSessionInstrumention (#340)
* Add ability to set a parent using a callback in URLSessionInstrumention, and associated tests
* Convert to generic customization of spans, instead of just customizing parent
Copy file name to clipboardExpand all lines: Sources/Instrumentation/URLSession/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ This behaviour can be modified or augmented by using the optional callbacks defi
19
19
20
20
`nameSpan: ((URLRequest) -> (String)?)?` - Modifies the name for the given request instead of stantard Opentelemetry name
21
21
22
+
`spanCustomization: ((URLRequest, SpanBuilder) -> Void)?` - Customizes the span while it's being built, such as by adding a parent, a link, attributes, etc.
23
+
22
24
`createdRequest: ((URLRequest, Span) -> Void)?` - Called after request is created, it allows to add extra information to the Span
23
25
24
26
`receivedResponse: ((URLResponse, DataOrFile?, Span) -> Void)?`- Called after response is received, it allows to add extra information to the Span
0 commit comments