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
Determine whether a destination is the configured Sentry endpoint by comparing
its parsed hostname with the DSN hostname instead of searching for the DSN
network-location text anywhere in the candidate string.
This prevents hostname suffixes, URL user-info, paths, and query strings from
being classified as SDK-internal. It preserves scheme-independent and raw-host
input, case-insensitive matching, IPv6 handling, and the agreed
same-host/different-port behavior. The exact contract was confirmed by the
maintainer in #7332.
Regression coverage includes the classifier and downstream trace-header
propagation decisions.
uv run tox -e py3.14-common: 2,431 total cases, 173 skipped, 0 failures/errors
uv run --group typing mypy sentry_sdk: no issues in 193 source files
full tests/test_utils.py: 224 passed, 2 skipped
full tests/tracing/test_misc.py: 43 passed
full tests/integrations/stdlib/test_httplib.py: 91 passed
uv run ruff check and uv run ruff format --check: passed
uv run pre-commit run --all-files: passed
git diff --check: passed
Review and tooling
AI tools assisted with repository navigation, implementation drafting, test
execution, and diff analysis. The account holder reviewed and approved the
final three-file diff and validation evidence before submission, understands
the hostname-matching contract, and accepts responsibility for the
contribution. The commands above were executed through Codex in the account
holder's local checkout; they are not presented as commands manually typed by
the account holder.
Following up on the hostname-matching fix for #7332. The change compares parsed hostnames so suffixes, user-info, paths, and query strings do not classify a destination as SDK-internal, while retaining the existing same-host/different-port behavior. Could someone familiar with this area review the intended matching contract? Happy to make changes.
Rebased on current master (the branch was 150 commits behind); the change still applies cleanly and tests/test_utils.py, tests/tracing/test_misc.py and tests/integrations/stdlib/test_httplib.py pass locally (391 passed, 2 skipped, Python 3.13), and the four CI checks are green on the new head. The matching contract is the one confirmed in #7332. Is there anything you'd like changed before a review?
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Determine whether a destination is the configured Sentry endpoint by comparing
its parsed hostname with the DSN hostname instead of searching for the DSN
network-location text anywhere in the candidate string.
This prevents hostname suffixes, URL user-info, paths, and query strings from
being classified as SDK-internal. It preserves scheme-independent and raw-host
input, case-insensitive matching, IPv6 handling, and the agreed
same-host/different-port behavior. The exact contract was confirmed by the
maintainer in #7332.
Regression coverage includes the classifier and downstream trace-header
propagation decisions.
Issues
Validation
uv run tox -e py3.14-common: 2,431 total cases, 173 skipped, 0 failures/errorsuv run --group typing mypy sentry_sdk: no issues in 193 source filestests/test_utils.py: 224 passed, 2 skippedtests/tracing/test_misc.py: 43 passedtests/integrations/stdlib/test_httplib.py: 91 passeduv run ruff checkanduv run ruff format --check: passeduv run pre-commit run --all-files: passedgit diff --check: passedReview and tooling
AI tools assisted with repository navigation, implementation drafting, test
execution, and diff analysis. The account holder reviewed and approved the
final three-file diff and validation evidence before submission, understands
the hostname-matching contract, and accepts responsibility for the
contribution. The commands above were executed through Codex in the account
holder's local checkout; they are not presented as commands manually typed by
the account holder.