-
Notifications
You must be signed in to change notification settings - Fork 599
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
Fix requests and urllib instrumentations span name callback parameters #259
Changes from all commits
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 |
---|---|---|
|
@@ -122,7 +122,7 @@ def _instrumented_requests_call( | |
method = method.upper() | ||
span_name = "" | ||
if name_callback is not None: | ||
span_name = name_callback() | ||
span_name = name_callback(method, url) | ||
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. Just a thought that although this is sufficient for the vast majority of cases, I have a feeling people may want to customize the span name further later on. For example, one cannot extracted values from the header and add them to the span name. I don't have a great solution (besides passing in all args via **kwargs, etc), but this may come up as an issue. 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. Yeah I thought of that too. For now, I think this is sufficient and we can change the parameters if the need arises. |
||
if not span_name or not isinstance(span_name, str): | ||
span_name = get_default_span_name(method) | ||
|
||
|
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.
Note that there's an extra dash on line 43 here.
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.
Probably will be fixed in a new pr