feat(node): Add eveInstrumentation and eveIntegration for eve apps - #24539
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
JPeer264
left a comment
There was a problem hiding this comment.
It's a draft so I won't approve (not sure if it will change still), but overall it looks good
| "@sentry/node": "file:../../packed/sentry-node-packed.tgz", | ||
| "ai": "^7.0.82", | ||
| "dataloader": "^2.2.3", | ||
| "eve": "^0.52.3", |
There was a problem hiding this comment.
q: Do we still support the older versions?
There was a problem hiding this comment.
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)
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>
8027315 to
70f41cb
Compare
## DESCRIBE YOUR PR Update the Eve guide for the new single-file instrumentation provider introduced by getsentry/sentry-javascript#24539. The guide now uses `defineInstrumentation(Sentry.eveInstrumentation(...))`, documents built-in conversation grouping and privacy controls through that provider, removes the old hook-based approach, and sets Eve `0.63.0` as the minimum supported version. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've supplied a deadline. Thanks in advance for your help! ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via **Francesco Gringl-Novy**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0C22CSDV6X%3A1789990671.892639 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0C22CSDV6X%3A1789990671.892639) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0C22CSDV6X%3A1789990671.892639/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>

eve 0.62/0.63 changed its instrumentation contract in two ways that broke the
node-evee2e app and made gen_ai content capture awkward: a flatagent/instrumentation.tsis no longer discovered (it must live underagent/instrumentation/<provider>.tsand exportdefineInstrumentation(...)), and eve now stamps every AI SDK call withrecordInputs/recordOutputs: false. That per-call flag on theai:telemetrychannel outranks the globaldataCollection.genAIsetting, so gen_ai message content was silently dropped — the only escape was settingrecordInputs/recordOutputsper 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 explicitdataCollection.genAIorvercelAIIntegration({ recordInputs })still take precedence.Sentry.eveInstrumentation(options)(in@sentry/node) — an all-in-one provider for a singleagent/instrumentation/*.tsfile. It runsSentry.init(addingeveIntegration) at server startup and tags each turn's AI spans with the eve session id as the Sentry conversation id viaturn.started/step.attempt.startedevents, replacing the separateeveConversationHookfile. AcceptsgetConversationIdto customize the id.The
node-evee2e app is migrated to eve^0.63.0and the new single-file setup.New Usage