-
Notifications
You must be signed in to change notification settings - Fork 630
fix(pyreqwest): Gate url.full, url.query, url.fragment on send_default_pii #6673
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 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 |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| from sentry_sdk import start_span | ||
| from sentry_sdk.consts import OP, SPANDATA | ||
| from sentry_sdk.integrations import DidNotEnable, Integration | ||
| from sentry_sdk.scope import should_send_default_pii | ||
| from sentry_sdk.traces import StreamedSpan | ||
| from sentry_sdk.tracing import BAGGAGE_HEADER_NAME | ||
| from sentry_sdk.tracing_utils import ( | ||
|
|
@@ -95,7 +96,7 @@ def _sentry_pyreqwest_span(request: "Request") -> "Generator[Any, None, None]": | |
| SPANDATA.HTTP_REQUEST_METHOD: request.method, | ||
| }, | ||
| ) as span: | ||
| if parsed_url is not None: | ||
| if parsed_url is not None and should_send_default_pii(): | ||
|
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. Bug: The non-streamed request path in the pyreqwest integration does not respect the Suggested FixAdd the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| span.set_attribute(SPANDATA.URL_FULL, parsed_url.url) | ||
| span.set_attribute(SPANDATA.URL_QUERY, parsed_url.query) | ||
| span.set_attribute(SPANDATA.URL_FRAGMENT, parsed_url.fragment) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.