Problem
sourceMaps is currently advertised by sentry init in its --features
help and documentation, while the init service deliberately removes it from
both interactive and CLI-preselected features.
Keeping it disabled is currently the correct behavior. A valid source map setup
requires more than changing bundler configuration:
- Production builds must emit source maps.
- A Sentry bundler plugin or
sentry sourcemap inject + upload must run in the
build that is actually deployed.
- Upload requires a CI-safe Organization Auth Token with the
org:ci scope.
- The token must be installed as
SENTRY_AUTH_TOKEN in CI and must never pass
through the init server, LLM context, telemetry, or committed files.
- Browser source maps should normally be hidden and deleted after upload.
Without that flow, init can produce configuration that looks complete while no
artifacts are ever uploaded.
Source maps are also a build/deployment concern, not a runtime product feature
like tracing, replay, or profiling. They should not appear as a peer option in
the feature picker.
Existing blocker
Token management is already tracked by #1110 and PR #1112.
The current organization-token management endpoints only accept browser session
authentication and explicitly reject Bearer authentication. The CLI therefore
cannot mint an Organization Auth Token using its stored OAuth token. This needs
a supported backend flow before it can be automated safely.
This issue should depend on #1110 rather than implementing another token
creation workaround.
Proposed UX
Until end-to-end setup is possible:
- Keep source maps out of the interactive feature list.
- Stop advertising
sourcemaps as a currently supported --features value.
- The internal feature/schema value may remain for future planner work.
Once token provisioning is supported, offer source maps as an eligible
build-setup step for JavaScript projects rather than as a runtime feature.
Required setup flow
- Detect the framework, bundler, production output directory, and CI/build
configuration.
- Prefer the official framework or bundler plugin.
- Fall back to
sentry sourcemap inject followed by
sentry sourcemap upload for custom builds.
- Configure
SENTRY_ORG and SENTRY_PROJECT, while referencing
SENTRY_AUTH_TOKEN only through the environment.
- Create an Organization Auth Token with
org:ci through the future supported
token flow, or give the user a secure browser handoff.
- Explain how to add the one-time token to the project's CI secret store.
- Use hidden source maps and delete browser maps after upload where supported.
- Verify using a production build and confirm that an artifact bundle reached
Sentry.
- Do not require or invent a release. Modern Debug ID matching works without a
release; preserve existing release configuration when one already exists.
Acceptance criteria
References
Problem
sourceMapsis currently advertised bysentry initin its--featureshelp and documentation, while the init service deliberately removes it from
both interactive and CLI-preselected features.
Keeping it disabled is currently the correct behavior. A valid source map setup
requires more than changing bundler configuration:
sentry sourcemap inject+uploadmust run in thebuild that is actually deployed.
org:ciscope.SENTRY_AUTH_TOKENin CI and must never passthrough the init server, LLM context, telemetry, or committed files.
Without that flow, init can produce configuration that looks complete while no
artifacts are ever uploaded.
Source maps are also a build/deployment concern, not a runtime product feature
like tracing, replay, or profiling. They should not appear as a peer option in
the feature picker.
Existing blocker
Token management is already tracked by #1110 and PR #1112.
The current organization-token management endpoints only accept browser session
authentication and explicitly reject Bearer authentication. The CLI therefore
cannot mint an Organization Auth Token using its stored OAuth token. This needs
a supported backend flow before it can be automated safely.
This issue should depend on #1110 rather than implementing another token
creation workaround.
Proposed UX
Until end-to-end setup is possible:
sourcemapsas a currently supported--featuresvalue.Once token provisioning is supported, offer source maps as an eligible
build-setup step for JavaScript projects rather than as a runtime feature.
Required setup flow
configuration.
sentry sourcemap injectfollowed bysentry sourcemap uploadfor custom builds.SENTRY_ORGandSENTRY_PROJECT, while referencingSENTRY_AUTH_TOKENonly through the environment.org:cithrough the future supportedtoken flow, or give the user a secure browser handoff.
Sentry.
release; preserve existing release configuration when one already exists.
Acceptance criteria
.mapfiles publicly.References
sentry tokensubcommands (create, list, delete) #1112