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

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