Skip to content

docs(eve): Move Sentry.init to the agent/instrumentation/ directory - #19530

Closed
sergical wants to merge 1 commit into
masterfrom
docs/eve-instrumentation-directory
Closed

sergical wants to merge 1 commit into
masterfrom
docs/eve-instrumentation-directory

Conversation

@sergical

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Eve 0.62.0 removed agent/instrumentation.ts. When the file exists, eve build fails with this error:

Found removed instrumentation file ".../agent/instrumentation.ts". Move it into the "instrumentation/" directory as one file per provider.

The Eve guide still told users to create that file. A user who follows the guide on a current Eve version cannot build their agent.

Changes to docs/platforms/javascript/guides/eve/index.mdx:

  • Configure: Sentry.init moves to agent/instrumentation/sentry.ts. Eve requires each file in that directory to default-export a provider, so the file exports defineInstrumentation({ flush }), which also flushes Sentry when Eve flushes telemetry.
  • Upgrade alert: explains the removal, the build failure, and that every file in agent/instrumentation/ is a provider, so helper code belongs in a different directory.
  • Prompt and output recording: the guide said that prompts and outputs are recorded by default. That is true only under eve dev. Outside development, Eve passes recordInputs: false and recordOutputs: false on each model call, and those values take priority over dataCollection.genAI. A new subsection shows the fix: Sentry.vercelAIIntegration({ recordInputs: true, recordOutputs: true }).
  • OpenTelemetry ownership: warns against Eve's otel() and otelIntegration() providers next to the SDK setup. Eve refuses to start when the global tracer provider is already registered.
  • Verify and Supported Versions: updated for the new path. The tested Eve version is now 0.63.0.

How I tested: eve 0.63.0 with @sentry/node 11.0.0-rc.0, two-turn sessions under eve dev and eve start. I checked the gen_ai.* spans, the conversation id, and the recorded inputs and outputs in Sentry. The example app is in getsentry/sentry-agent-tracing-examples.

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)

Created with Claude Code

Eve 0.62.0 removed agent/instrumentation.ts. The build fails when the
file exists. The guide now puts Sentry.init in
agent/instrumentation/sentry.ts with a default-exported provider.

The guide also states that Eve turns off prompt and output recording
outside development, shows the vercelAIIntegration options that turn it
on, and warns against Eve's otel() providers next to the SDK setup.

Co-authored-by: Claude <claude@anthropic.com>
@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Sep 21, 2026 12:01pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Sep 21, 2026 12:01pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Sep 21, 2026
Comment on lines +156 to 159
```typescript {filename:agent/instrumentation/sentry.ts}
Sentry.init({
dsn: "___PUBLIC_DSN___",
dataCollection: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Documentation snippets for agent/instrumentation/sentry.ts are presented as complete files but lack the required export default defineInstrumentation({...}) wrapper, causing build failures.
Severity: MEDIUM

Suggested Fix

Update the documentation snippets to either include the full, valid file content including the export default defineInstrumentation({...}) wrapper and necessary imports, or explicitly label them as partial examples that must be merged into the existing file configuration. This will prevent users from creating invalid files.

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: docs/platforms/javascript/guides/eve/index.mdx#L156-L159

Potential issue: The documentation for Eve presents several code snippets for
`agent/instrumentation/sentry.ts` as if they are complete files, using a filename
indicator. However, these snippets are missing the required `export default
defineInstrumentation({...})` wrapper. The guide explicitly states that every file in
the `agent/instrumentation/` directory must have this default export. A user copying and
pasting these incomplete snippets from sections like 'Privacy Controls' or 'Record
Prompts' will create an invalid file, causing the Eve build process to fail.

Also affects:

  • docs/platforms/javascript/guides/eve/index.mdx:173~183

Did we get this right? 👍 / 👎 to inform future reviews.

@sergical

Copy link
Copy Markdown
Member Author

Closing. #19529 landed first and documents the new Sentry.eveInstrumentation() provider from getsentry/sentry-javascript#24539, which covers the same eve 0.62+ changes (the agent/instrumentation/ layout, and the per-call recordInputs: false that dropped prompt content outside eve dev). That is the better fix.

@sergical sergical closed this Sep 22, 2026

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 21bd4931 Deployed Sep 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant