Skip to content

fix(deno): instrument outgoing fetch requests - #24121

Open
psang39 wants to merge 1 commit into
getsentry:developfrom
psang39:fix/deno-fetch-tracing
Open

fix(deno): instrument outgoing fetch requests#24121
psang39 wants to merge 1 commit into
getsentry:developfrom
psang39:fix/deno-fetch-tracing

Conversation

@psang39

@psang39 psang39 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
  • Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked.

This adds tracing support for outgoing fetch requests in the Deno SDK, based on the existing Bun fetch integration.

The new integration:

  • creates http.client spans for outgoing fetch requests
  • propagates sentry-trace and baggage headers according to tracePropagationTargets
  • skips requests sent to Sentry
  • leaves fetch breadcrumb recording to the existing breadcrumbs integration, avoiding duplicate breadcrumbs
  • is enabled by default and exported for manual configuration

Tests cover default integration registration, span creation, trace-header propagation, and preservation of exactly one fetch breadcrumb.

Testing

  • corepack yarn lint in packages/deno — passed
  • oxfmt --check on the changed files — passed
  • deno test --allow-net --allow-read --allow-run --allow-env --no-check test/deno-fetch.test.ts — 2 passed
  • Full corepack yarn test in packages/deno — 66 passed, 1 failed in the existing captureException path-normalization assertion on Windows (C:/... vs app:///...)

Closes #23891

Fixes getsentry#23891

Co-Authored-By: OpenAI Codex <codex@openai.com>
@psang39
psang39 marked this pull request as ready for review September 6, 2026 16:20
@psang39
psang39 requested a review from a team as a code owner September 6, 2026 16:20
@psang39
psang39 requested review from isaacs and mydea and removed request for a team September 6, 2026 16:20
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.

deno: Outgoing fetch gets no span and no trace propagation

1 participant