Skip to content

fix(elysia): Set SDK metadata on the options passed to init - #24521

Open
Shubham-Padkonde wants to merge 1 commit into
getsentry:developfrom
Shubham-Padkonde:fix/elysia-sdk-metadata
Open

Shubham-Padkonde wants to merge 1 commit into
getsentry:developfrom
Shubham-Padkonde:fix/elysia-sdk-metadata

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

init() copied userOptions into options and then called applySdkMetadata(userOptions, ...). When userOptions._metadata was undefined, the metadata was created on userOptions only, and @sentry/bun's init then set its own bun metadata on the copy. Events were reported as sentry.javascript.bun.

applySdkMetadata is now applied to the options passed to init, so the Elysia SDK name is kept (@sentry/bun only sets metadata when none exists).

  • Tests: added a test that the metadata is applied to the same options object that is passed to the Bun SDK's init; it fails before this change. vitest run in packages/elysia passes (32 tests). I did not add an end-to-end event.sdk.name assertion, as the existing Elysia SDK tests mock @sentry/bun.
  • oxfmt --check passes on the changed files. oxlint reports the same results as before the change in my environment.

Closes #24045

🤖 Generated with Claude Code

applySdkMetadata was applied to userOptions after they had already been
copied into the options passed to @sentry/bun's init, so the copy kept no
metadata and Bun set its own. Events were reported as
sentry.javascript.bun instead of sentry.javascript.elysia.

Fixes getsentry#24045

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Shubham-Padkonde
Shubham-Padkonde requested a review from a team as a code owner September 19, 2026 09:30
@Shubham-Padkonde
Shubham-Padkonde requested review from mydea and s1gr1d and removed request for a team September 19, 2026 09:30
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.

Elysia events report as sentry.javascript.bun

1 participant