Skip to content

Elysia events report as sentry.javascript.bun #24045

Closed

Description

@isaacs

Running under both node and bun, with the built @sentry/elysia:

sdk: {"name":"sentry.javascript.bun","version":"10.67.0",
      "packages":[{"name":"npm:@sentry/bun","version":"10.67.0"}]}

sentry.javascript.elysia never appears. packages/elysia/src/sdk.ts:44 copies userOptions into options before calling applySdkMetadata(userOptions, 'elysia', ...). When userOptions._metadata is undefined, applySdkMetadata creates a fresh _metadata on userOptions, which the already-made copy does not have. initBun(options) then applies its own 'bun' metadata to the copy.

The Elysia SDK is invisible in SDK adoption telemetry, and support cannot tell Elysia reports from plain Bun ones.

Work item. Call applySdkMetadata(options, ...) on the copy, or move the call above the spread. One-line fix. Add an assertion to packages/elysia/test that event.sdk.name === 'sentry.javascript.elysia'.

Prior art the identical bug was already found and fixed one package over: #15458/#15459 "fix(bun): Includes correct sdk metadata". That PR also added the SDK-metadata assertion to the Bun tests, which is the test to copy here.

Activity

  1. added
    javascriptPull requests that update javascript code
    on Sep 4, 2026
  2. linear-code commented on Sep 4, 2026

    @linear-code
  3. self-assigned this
    on Oct 17, 2026
  4. added a commit that references this issue on Oct 18, 2026
    e4ae88d
  5. added a commit that references this issue on Oct 18, 2026
    6244a8b
  6. github-actions commented on Oct 23, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #24521, which was included in the 11.9.0 release.

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

Metadata

Metadata

Assignees

Labels

BugBunjavascriptPull requests that update javascript code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions