Repository navigation
feat(dashboard): Sentry release from CHANGELOG version - #748
Merged
Merged
Conversation
next.config.ts derives telemetry-tracker-dashboard@<version> from the newest versioned CHANGELOG section at build time and inlines it as TT_SENTRY_RELEASE for client, server, and edge. sentryInitOptions sets release only when present. No env var or build arg needed.
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.
Base branch:
develop.Summary
Browser Sentry has been live since v1.18.2 but reports
release: undefined, so Sentry sends no release-health sessions (sessions require a release) and errors are not tagged by version.apps/dashboard/lib/sentry-release.ts: derivestelemetry-tracker-dashboard@<version>from the newest versioned## [x.y.z]section of the repo-rootCHANGELOG.md(same source and semver rule as the API'sgenerate-api-version.cjs/API_VERSION).next.config.tsreadsCHANGELOG.mdat build time and inlines it via NextenvasTT_SENTRY_RELEASE(client, server, and edge bundles). The Docker build already copiesCHANGELOG.mdinto/app, so no Railway variable and no new build arg are needed.sentryInitOptions(shared by browser / server / edge init) setsreleaseonly when present. Unresolvable version →releasestays unset (same as today).vX.Y.Ztags; Railway'sRAILWAY_GIT_COMMIT_SHAis not passed into Docker builds anyway.@sentry/node) does not set a release today, so there is nothing to align with; it could adopttelemetry-tracker-api@${API_VERSION}separately.DEPLOYMENT.md(Dashboard). CHANGELOG[Unreleased]→ Added.How to test
vitest(dashboard): 41 files / 227 tests ✅ incl. newlib/sentry-release.test.ts(newest version, Unreleased skipped, fallbacks, real CHANGELOG format, init options include/omitrelease).pnpm lint✅pnpm --filter dashboard buildwith a dummyNEXT_PUBLIC_SENTRY_DSN✅ —[email protected](current CHANGELOG) is inlined instatic/chunks/main*.js,server/chunks/*, andserver/edge-instrumentation.js;next.config.tsimporting./lib/sentry-releaseworks.tsc --noEmit(dashboard): only the 6 pre-existing test-file errors, identical todevelop.Code review (Bugbot)
Checklist
[Unreleased]updatedSecurity / privacy
Release name is a public version string. No secrets; no source-map upload credentials added.