docs: document turbo.json SENTRY_SPOTLIGHT env configuration#1306
Conversation
Add a Turborepo Setup section to the README explaining how to configure SENTRY_SPOTLIGHT in turbo.json so the environment variable is available across all packages in a monorepo. Fixes #868
|
@SSDWGG is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
| ```json | ||
| { | ||
| "pipeline": { | ||
| "dev": { | ||
| "env": ["SENTRY_SPOTLIGHT"] | ||
| }, | ||
| "build": { | ||
| "env": ["SENTRY_SPOTLIGHT"] | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Bug: The turbo.json example uses the deprecated pipeline key instead of tasks, which will not work for users on Turborepo v2.0+.
Severity: MEDIUM
Suggested Fix
In the turbo.json example, replace the "pipeline" key with "tasks" to align with the breaking changes introduced in Turborepo 2.0. This will ensure the configuration works correctly for users on modern versions.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: README.md#L58-L68
Potential issue: The `turbo.json` configuration example in the documentation uses the
`pipeline` key. This key was renamed to `tasks` as a breaking change in Turborepo 2.0.
Users on modern Turborepo versions (2.0+) who follow this example will have a
non-functional setup. The `SENTRY_SPOTLIGHT` environment variable will not be forwarded
to their tasks as intended, defeating the purpose of the documentation.
Did we get this right? 👍 / 👎 to inform future reviews.
…line key Move the Turborepo env-var configuration from README.md to a proper quickstart page on the docs site. Fix the deprecated 'pipeline' key (Turborepo v1) to use 'tasks' (Turborepo v2+) in the turbo.json example. Fixes #868
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks for the contribution @SSDWGG! Great first issue to tackle. I pushed a follow-up commit that makes a couple of adjustments:
Will merge once CI passes. |
Summary
Fixes #868 — adds a Turborepo Setup section to the README documenting how to configure the
SENTRY_SPOTLIGHTenvironment variable inturbo.json.Problem
When using Spotlight in a Turborepo monorepo,
SENTRY_SPOTLIGHTmust be declared inturbo.jsonfor it to be available across all packages. Without this configuration, the environment variable may not be forwarded to packages consuming the Sentry SDK, and Spotlight won't receive telemetry from those packages.Change
Added a "Turborepo Setup" section to
README.mdwith:globalEnv)pipeline.dev.env,pipeline.build.env)Type of Change