GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: match Sentry URLs by parsed hostname by YusefSyed · Pull Request #7397 · getsentry/sentry-python

Conversation

@YusefSyed

@YusefSyed YusefSyed commented Sep 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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

  • resolves: DSN netloc substring matching misclassifies unrelated destinations as SDK-internal #7332

Validation

  • 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@YusefSyed
YusefSyed marked this pull request as ready for review September 4, 2026 15:59
@YusefSyed
YusefSyed requested a review from a team as a code owner September 4, 2026 15:59
@YusefSyed

YusefSyed commented Sep 14, 2026

Copy link
Copy Markdown
Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@YusefSyed
fix: match Sentry URLs by parsed hostname
36fefd3
@YusefSyed
YusefSyed force-pushed the codex/sentry-7332-hostname-matching branch from 8beb66c to 36fefd3 Compare November 1, 2026 06:20
@YusefSyed

YusefSyed commented Nov 1, 2026

Copy link
Copy Markdown
Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

DSN netloc substring matching misclassifies unrelated destinations as SDK-internal

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@YusefSyed
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.