Migrate Instrumentation
Move a single instrumentation.ts configuration into lifecycle instrumentation and OpenTelemetry destinations.
Replace agent/instrumentation.ts with path-named files under
agent/instrumentation/. Remove
experimental.instrumentationProviders from agent.ts; instrumentation
discovery is now always enabled.
Preserve metadata-only capture
In the removed API, omitted recordInputs and recordOutputs settings both
defaulted to false. Once an OpenTelemetry destination is present, the new
default includes content during development and for public conversations.
Add agent/instrumentation/otel.ts with an explicit metadata-only policy
before moving exporters:
After verifying each destination's retention and access controls, widen
recordInputs or recordOutputs deliberately if needed.
Move an OpenTelemetry exporter
Move each exporter into its own destination file and replace startup
registerOTel(...) calls with otelIntegration(...). Install @vercel/otel
if the exporter comes from that package:
The destination policy preserves metadata-only export even if the shared OpenTelemetry policy is widened later. Add another file for each additional destination; eve combines them into one pipeline.
Move runtime context and lifecycle events
Use this mapping when splitting the old definition:
agent/instrumentation.ts field | New location |
|---|---|
setup with registerOTel | One otelIntegration() file per destination |
functionId | otel({ functionId }) |
recordInputs, recordOutputs | otel({ tracePolicy }) |
traceChannelRequests | otel({ traceChannelRequests }) |
events["step.started"] | otelIntegration({ runtimeContext }) |
Move events["step.started"] to the destination that needs those attributes;
see Add runtime context. For
eve lifecycle events, create a separate file with defineInstrumentation(...);
see
Instrumentation.
Verify the migration
Run eve build. A remaining agent/instrumentation.ts fails the build with a
message directing you to the instrumentation directory.
New eve deployments automatically sample 100% of requests. Existing Vercel deployments need project sampling configured before you verify them. See Enable tracing on Vercel.
Then run the agent and verify each destination independently.