Skip to content

feat(node): Add eveInstrumentation and eveIntegration for eve apps - #24539

Merged
mydea merged 4 commits into
developfrom
feat/eve-instrumentation
Sep 21, 2026
Merged

mydea merged 4 commits into
developfrom
feat/eve-instrumentation

Conversation

@mydea

@mydea mydea commented Sep 21, 2026

Copy link
Copy Markdown
Member

eve 0.62/0.63 changed its instrumentation contract in two ways that broke the node-eve e2e app and made gen_ai content capture awkward: a flat agent/instrumentation.ts is no longer discovered (it must live under agent/instrumentation/<provider>.ts and export defineInstrumentation(...)), and eve now stamps every AI SDK call with recordInputs/recordOutputs: false. That per-call flag on the ai:telemetry channel outranks the global dataCollection.genAI setting, so gen_ai message content was silently dropped — the only escape was setting recordInputs/recordOutputs per integration, which is poor DX.

This adds two APIs in @sentry/server-utils, re-exported from the runtime packages:

  • eveIntegration() — marks the client so the Vercel AI channel subscriber records gen_ai inputs/outputs by default under eve. An explicit dataCollection.genAI or vercelAIIntegration({ recordInputs }) still take precedence.
  • Sentry.eveInstrumentation(options) (in @sentry/node) — an all-in-one provider for a single agent/instrumentation/*.ts file. It runs Sentry.init (adding eveIntegration) at server startup and tags each turn's AI spans with the eve session id as the Sentry conversation id via turn.started / step.attempt.started events, replacing the separate eveConversationHook file. Accepts getConversationId to customize the id.

The node-eve e2e app is migrated to eve ^0.63.0 and the new single-file setup.

New Usage

// agent/instrumentation/sentry.ts
import * as Sentry from '@sentry/node';
import { defineInstrumentation } from 'eve/instrumentation';

export default defineInstrumentation(
  Sentry.eveInstrumentation({
    dsn: process.env.E2E_TEST_DSN,
    tracesSampleRate: 1.0,
  }),
);

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.07 kB - -
@sentry/browser - with treeshaking flags 27.34 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.24 kB - -
@sentry/browser (incl. Tracing) 50.55 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 50.56 kB - -
@sentry/browser (incl. Tracing, Profiling) 53.55 kB - -
@sentry/browser (incl. Tracing, Replay) 90.09 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.18 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 94.78 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 107.76 kB - -
@sentry/browser (incl. Feedback) 46.6 kB - -
@sentry/browser (incl. sendFeedback) 34.13 kB - -
@sentry/browser (incl. FeedbackAsync) 39.25 kB - -
@sentry/browser (incl. Metrics) 30.08 kB - -
@sentry/browser (incl. Logs) 30.34 kB - -
@sentry/browser (incl. Metrics & Logs) 31 kB - -
@sentry/react 30.82 kB - -
@sentry/react (incl. Tracing) 52.86 kB - -
@sentry/vue 36.33 kB - -
@sentry/vue (incl. Tracing) 52.84 kB - -
@sentry/svelte 29.1 kB - -
CDN Bundle 30.77 kB - -
CDN Bundle (incl. Tracing) 51.06 kB - -
CDN Bundle (incl. Logs, Metrics) 33.02 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.71 kB - -
CDN Bundle (incl. Tracing, Replay) 88.61 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 90.54 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 94.66 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 96.67 kB - -
CDN Bundle - uncompressed 91.07 kB - -
CDN Bundle (incl. Tracing) - uncompressed 152.44 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.64 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 158.4 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.05 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 272.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 277.95 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 285.72 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 291.65 kB - -
@sentry/nextjs (client) 55.19 kB - -
@sentry/sveltekit (client) 50.98 kB - -
@sentry/core/server 39.97 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 133.37 kB +0.05% +54 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.15 kB - -
@sentry/node - without tracing 89.92 kB +0.03% +21 B 🔺
@sentry/node - without channel injection 112.16 kB +0.06% +59 B 🔺
@sentry/aws-serverless 98.19 kB +0.02% +18 B 🔺
@sentry/cloudflare (withSentry) - minified 204.67 kB - -
@sentry/cloudflare (withSentry) 509.34 kB - -

View base workflow run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit db2143c. Configure here.

Comment thread packages/node/src/eve.ts

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a draft so I won't approve (not sure if it will change still), but overall it looks good

Comment thread packages/node/src/eve.ts
Comment thread packages/server-utils/src/eve.ts Outdated
"@sentry/node": "file:../../packed/sentry-node-packed.tgz",
"ai": "^7.0.82",
"dataloader": "^2.2.3",
"eve": "^0.52.3",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

q: Do we still support the older versions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

technically yeah through the setup that is documented here (nothing about this changes really), for simplicity I'd just say we support this though and keep to a single setup (they are sadly mutually exclusive)

Comment thread packages/server-utils/test/integrations/vercel-ai/eve-recording.test.ts Outdated
@mydea
mydea marked this pull request as ready for review September 21, 2026 11:37
@mydea
mydea requested review from a team as code owners September 21, 2026 11:37
@mydea
mydea requested review from JPeer264, isaacs, nicohrubec and s1gr1d and removed request for a team September 21, 2026 11:37
mydea and others added 4 commits September 21, 2026 14:22
eve 0.62/0.63 changed its instrumentation contract: a flat
`agent/instrumentation.ts` is no longer discovered (it must live under
`agent/instrumentation/<provider>.ts` and export `defineInstrumentation(...)`),
and eve now stamps every AI SDK call with `recordInputs`/`recordOutputs: false`.
That per-call flag on the `ai:telemetry` channel outranks the global
`dataCollection.genAI` setting, so gen_ai message content was silently dropped.

Add two APIs (in `@sentry/server-utils`, re-exported from the runtime packages):

- `eveIntegration()` marks the client so the Vercel AI channel subscriber records
  gen_ai inputs/outputs by default under eve; an explicit `dataCollection.genAI`
  or `vercelAIIntegration({ recordInputs })` still take precedence.
- `Sentry.eveInstrumentation(options)` (in `@sentry/node`) is an all-in-one
  provider for a single `agent/instrumentation/*.ts` file: it runs `Sentry.init`
  (adding `eveIntegration`) at startup and tags each turn's AI spans with the eve
  session id as the conversation id via `turn.started` / `step.attempt.started`
  events, replacing the separate `eveConversationHook` file. Accepts
  `getConversationId` to customize the id.

Also migrate the `node-eve` e2e app to eve `^0.63.0` and the new single-file
setup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ages

The `consistentExports` check requires packages that re-export `@sentry/node`
by name (astro, bun, aws-serverless, google-cloud-serverless) to mirror its
exports; add `eveInstrumentation` to each.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jan Peer Stöcklmair <jan.oster94@gmail.com>
@mydea
mydea force-pushed the feat/eve-instrumentation branch from 8027315 to 70f41cb Compare September 21, 2026 12:23
@mydea
mydea enabled auto-merge (squash) September 21, 2026 12:24
@mydea
mydea merged commit ce49d5b into develop Sep 21, 2026
241 of 243 checks passed
@mydea
mydea deleted the feat/eve-instrumentation branch September 21, 2026 12:39
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.

2 participants