Skip to content

feat: Use new eve instrumentation hooks - #2373

Merged
Luca Forstner (lforst) merged 2 commits into
mainfrom
lforst/dum-e/vancouver-de924b6643
Aug 18, 2026
Merged

Luca Forstner (lforst) merged 2 commits into
mainfrom
lforst/dum-e/vancouver-de924b6643

Conversation

@lforst

@lforst Luca Forstner (lforst) commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Based on vercel/eve#1799.

Upgrade guide

The instrumentation-provider API requires eve@0.34.0 or newer and the Braintrust release containing this PR (expected braintrust@3.28.0). After that release is published, upgrade both packages:

pnpm add eve@^0.34.0 braintrust@^3.28.0

Enable instrumentation providers on the Eve agent:

export default defineAgent({
  experimental: { instrumentationProviders: true },
  // ...the rest of the agent configuration
});

Then export the Braintrust provider directly from instrumentation/braintrust.ts:

import { braintrustEveInstrumentation, initLogger } from "braintrust";

export default braintrustEveInstrumentation({
  metadata: {
    // Optional metadata added to every captured span.
  },
  setup: ({ agentName }) => {
    initLogger({ projectName: agentName });
  },
});

With the provider API, do not wrap the result in Eve defineInstrumentation, and do not pass Eve defineState. Remove the legacy braintrustEveHook configuration from root agents and subagents as well; the provider receives turn, model, and action lifecycle events for the entire trace and would otherwise duplicate instrumentation.

Existing Eve integrations can remain on the legacy API. They may continue exporting braintrustEveInstrumentation({ defineState, setup }) until they are ready to upgrade Eve and enable instrumentation providers.

@lforst
Luca Forstner (lforst) merged commit 5faeaff into main Aug 18, 2026
49 checks passed
@lforst
Luca Forstner (lforst) deleted the lforst/dum-e/vancouver-de924b6643 branch August 18, 2026 14:37
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