Skip to content

docs: document turbo.json SENTRY_SPOTLIGHT env configuration#1306

Merged
BYK merged 2 commits into
getsentry:mainfrom
SSDWGG:docs/turbo-json-env-config
May 15, 2026
Merged

docs: document turbo.json SENTRY_SPOTLIGHT env configuration#1306
BYK merged 2 commits into
getsentry:mainfrom
SSDWGG:docs/turbo-json-env-config

Conversation

@SSDWGG
Copy link
Copy Markdown
Contributor

@SSDWGG SSDWGG commented May 15, 2026

Summary

Fixes #868 — adds a Turborepo Setup section to the README documenting how to configure the SENTRY_SPOTLIGHT environment variable in turbo.json.

Problem

When using Spotlight in a Turborepo monorepo, SENTRY_SPOTLIGHT must be declared in turbo.json for 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.md with:

  • Global env variable declaration (globalEnv)
  • Scoped pipeline configuration (pipeline.dev.env, pipeline.build.env)
  • Brief explanation of why this is needed

Type of Change

  • Documentation

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
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@SSDWGG is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread README.md Outdated
Comment on lines +58 to +68
```json
{
"pipeline": {
"dev": {
"env": ["SENTRY_SPOTLIGHT"]
},
"build": {
"env": ["SENTRY_SPOTLIGHT"]
}
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spotlightjs Ready Ready Preview, Comment May 15, 2026 0:08am

Request Review

@BYK BYK deployed to Preview May 15, 2026 12:07 — with GitHub Actions Active
@BYK
Copy link
Copy Markdown
Member

BYK commented May 15, 2026

Thanks for the contribution @SSDWGG! Great first issue to tackle.

I pushed a follow-up commit that makes a couple of adjustments:

  1. Moved the content to the docs site — The README is a high-level project overview, so the Turborepo setup guide is a better fit as a quickstart page at packages/website/src/content/docs/docs/quickstart/turborepo.mdx. It'll automatically appear under "Quick Starts" in the sidebar alongside the Next.js guide.

  2. Fixed pipelinetasks — Turborepo v2 renamed pipeline to tasks as a breaking change, so the original example wouldn't work for users on modern Turborepo versions. (The issue template had the old syntax too, so not your fault!)

Will merge once CI passes.

@BYK BYK enabled auto-merge (squash) May 15, 2026 12:08
@BYK BYK merged commit 4822f4c into getsentry:main May 15, 2026
17 of 18 checks passed
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.

Document turbo.json environment variable configuration for SENTRY_SPOTLIGHT

2 participants