Skip to content

feat(dashboard): Sentry release from CHANGELOG version - #748

Merged
unjica merged 1 commit into
developfrom
fix/dashboard-sentry-release
Oct 6, 2026
Merged

unjica merged 1 commit into
developfrom
fix/dashboard-sentry-release

Conversation

@unjica

@unjica unjica commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

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.

  • New apps/dashboard/lib/sentry-release.ts: derives telemetry-tracker-dashboard@<version> from the newest versioned ## [x.y.z] section of the repo-root CHANGELOG.md (same source and semver rule as the API's generate-api-version.cjs / API_VERSION).
  • next.config.ts reads CHANGELOG.md at build time and inlines it via Next env as TT_SENTRY_RELEASE (client, server, and edge bundles). The Docker build already copies CHANGELOG.md into /app, so no Railway variable and no new build arg are needed.
  • sentryInitOptions (shared by browser / server / edge init) sets release only when present. Unresolvable version → release stays unset (same as today).
  • No git SHA suffix: one release per platform version keeps release health aggregated and matches the vX.Y.Z tags; Railway's RAILWAY_GIT_COMMIT_SHA is not passed into Docker builds anyway.
  • API (@sentry/node) does not set a release today, so there is nothing to align with; it could adopt telemetry-tracker-api@${API_VERSION} separately.
  • Docs: DEPLOYMENT.md (Dashboard). CHANGELOG [Unreleased] → Added.

How to test

  • vitest (dashboard): 41 files / 227 tests ✅ incl. new lib/sentry-release.test.ts (newest version, Unreleased skipped, fallbacks, real CHANGELOG format, init options include/omit release).
  • pnpm lint ✅
  • Local pnpm --filter dashboard build with a dummy NEXT_PUBLIC_SENTRY_DSN ✅ — [email protected] (current CHANGELOG) is inlined in static/chunks/main*.js, server/chunks/*, and server/edge-instrumentation.js; next.config.ts importing ./lib/sentry-release works.
  • tsc --noEmit (dashboard): only the 6 pre-existing test-file errors, identical to develop.

Code review (Bugbot)

Paused: GitHub bugbot-review is currently a no-op.

Checklist

  • Tests pass
  • Lint passes
  • Build succeeds
  • CHANGELOG [Unreleased] updated
  • Documentation updated
  • No breaking changes

Security / privacy

Release name is a public version string. No secrets; no source-map upload credentials added.

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.
@unjica
unjica merged commit 8af0180 into develop Oct 6, 2026
7 checks passed
@unjica unjica mentioned this pull request Oct 6, 2026
4 of 7 tasks
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.

1 participant