Repository navigation
feat(browser): Read the release from the sentry-release meta tag - #26514
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
The browser SDK now picks up the release from `<meta name="sentry-release">` when `init` gets none. SvelteKit, SolidStart, React Router and TanStack Start drop their own client readers, and their servers render the tag with one shared helper from `@sentry/core`. Co-Authored-By: Isaac Schlueter <isaac.schlueter@sentry.io>
Contributor
size-limit report 📦Compared: f9e000f (PR test merge using fix/solidstart-release-runtime at 22d336a) Against: c7427bb (fix/solidstart-release-runtime) · base run #66559
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 62 successful. See the run.
Successful checks
|
This branch has not been deployed
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.
What
@sentry/browsernow reads the release from<meta name="sentry-release">whenSentry.init()gets norelease. SvelteKit, SolidStart, React Router and TanStack Start drop their own client readers. Their servers now render the tag with one shared helper,_INTERNAL_getReleaseMetaTagfrom@sentry/core/server, which replaces four copies ofescapeAttribute. The order is: an explicitrelease, then the meta tag, then__SENTRY_RELEASE__/window.SENTRY_RELEASE. An empty tag is ignored.Why
Each SDK in this stack had its own copy of the meta tag reader, the tag name, and the attribute escaping. With one reader in the browser SDK, every framework that renders the tag gets the same behavior.
Open decisions:
SENTRY_RELEASE: this keeps how the four SDK readers behaved. The page comes from the server on every request, so it is more current than a release that a cached chunk carries. It does change plain@sentry/browseron any page that already has asentry-releasemeta tag. Only Sentry SDKs write one, as far as I know.@sentry/browsergets a few bytes bigger for every user, including people who never render the tag.<meta .../>, the same as the other SDKs.Stacked on #26513.
Ref: #26485
via Isaac Schlueter.
--
View Session [Sentry]