Skip to content

Wrap parse_url calls in capture_internal_exceptions#2162

Merged
sentrivana merged 11 commits into
masterfrom
ivana/wrap-parse-url
Jun 13, 2023
Merged

Wrap parse_url calls in capture_internal_exceptions#2162
sentrivana merged 11 commits into
masterfrom
ivana/wrap-parse-url

Conversation

@sentrivana

@sentrivana sentrivana commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

Follow up to #2160

Our URL parsing and sanitizing can fail. If it does, the error must never break the user's application.

This PR:

  • wraps all calls to parse_url in capture_internal_exceptions and skips setting any parsed URL related data on the span (affects the stdlib, boto3, httpx integrations)
  • adds more test cases for the sanitize_url function with split=True

Comment thread sentry_sdk/integrations/httpx.py Outdated
@sentrivana
sentrivana marked this pull request as ready for review June 9, 2023 10:24

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to merge if we use SENSITIVE_DATA_SUBSTITUTE as placeholder. But it is up to you, if you think thats a stupid idea also fine to merge right away.

@sentrivana
sentrivana merged commit d991be7 into master Jun 13, 2023
@sentrivana
sentrivana deleted the ivana/wrap-parse-url branch June 13, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants