Skip to content

fix: keep the HERE key and queries out of Sentry spans - #43

Merged
leviFrosty merged 1 commit into
mainfrom
fix/here-proxy-uninstrumented-fetch
Oct 15, 2026
Merged

leviFrosty merged 1 commit into
mainfrom
fix/here-proxy-uninstrumented-fetch

Conversation

@leviFrosty

Copy link
Copy Markdown
Owner

The HERE proxy (/geocode, /autocomplete) called the global fetch. Sentry wraps that global on the first request, so every traced span and breadcrumb recorded the full upstream URL: the HERE API key (apiKey=) and what the user typed in the address search.

src/proxy.ts now captures fetch at module load, before Sentry wraps it, the same way route planning, APNs, FCM, and analytics already do.

Tests: the proxy and per-IP limit tests install a HERE stub before the worker is imported, and a new test checks that the proxy never calls the instrumented global.

Verification: pnpm test (736 passing), tsc --noEmit, and the verify loop with a real HERE_API_KEY: /geocode and /autocomplete e2e both pass.

After merge: rotate the HERE key, since past spans already hold the current one.

🤖 Generated with Claude Code

The HERE proxy called the global fetch, which Sentry wraps on the first
request, so every /geocode and /autocomplete span and breadcrumb recorded
the upstream URL: the API key and what the user typed. Capture fetch at
module load, as route planning, APNs, FCM, and analytics already do.
@leviFrosty
leviFrosty merged commit 3aa0f78 into main Oct 15, 2026
1 check passed
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.

1 participant