-
Notifications
You must be signed in to change notification settings - Fork 710
make span attribute available to urllib #1014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
edf6235
eeb1215
550f1ce
2266476
438c870
3566ee5
f1480ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,16 +182,18 @@ def _instrumented_open_call( | |
SpanAttributes.HTTP_METHOD: method, | ||
SpanAttributes.HTTP_URL: url, | ||
} | ||
|
||
span_attributes = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is already a dict with the exact same fields called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed it , I thought we needed a new dict for span attributes |
||
SpanAttributes.HTTP_METHOD: method, | ||
SpanAttributes.HTTP_URL: url, | ||
} | ||
|
||
with tracer.start_as_current_span( | ||
span_name, kind=SpanKind.CLIENT | ||
span_name, kind=SpanKind.CLIENT, attributes=span_attributes | ||
) as span: | ||
exception = None | ||
if callable(request_hook): | ||
request_hook(span, request) | ||
if span.is_recording(): | ||
srikanthccv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
span.set_attribute(SpanAttributes.HTTP_METHOD, method) | ||
span.set_attribute(SpanAttributes.HTTP_URL, url) | ||
|
||
headers = get_or_create_headers() | ||
inject(headers) | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done