fix(elysia): Set SDK metadata on the options passed to init - #24521
Open
Shubham-Padkonde wants to merge 1 commit into
Open
Shubham-Padkonde wants to merge 1 commit into
Shubham-Padkonde wants to merge 1 commit into
Conversation
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
requested review from
mydea and
s1gr1d
and removed request for
a team
September 19, 2026 09:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
init()copieduserOptionsintooptionsand then calledapplySdkMetadata(userOptions, ...). WhenuserOptions._metadatawas undefined, the metadata was created onuserOptionsonly, and@sentry/bun'sinitthen set its ownbunmetadata on the copy. Events were reported assentry.javascript.bun.applySdkMetadatais now applied to theoptionspassed toinit, so the Elysia SDK name is kept (@sentry/bunonly sets metadata when none exists).init; it fails before this change.vitest runinpackages/elysiapasses (32 tests). I did not add an end-to-endevent.sdk.nameassertion, as the existing Elysia SDK tests mock@sentry/bun.oxfmt --checkpasses on the changed files.oxlintreports the same results as before the change in my environment.Closes #24045
🤖 Generated with Claude Code