Skip to content

feat(eve): bridge evlog context into OpenTelemetry spans - #504

Closed
HugoRCD wants to merge 3 commits into
mainfrom
evl-217
Closed

feat(eve): bridge evlog context into OpenTelemetry spans#504
HugoRCD wants to merge 3 commits into
mainfrom
evl-217

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Aug 6, 2026

Copy link
Copy Markdown
Owner

🔗 Linked issue

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Summary by CodeRabbit

  • New Features

    • Added eve instrumentation that links AI model-call telemetry with evlog request and session context.
    • Added options to configure function identifiers, input/output recording, inbound channel tracing, and OpenTelemetry setup.
    • Calls outside tracked eve turns continue without runtime context.
  • Documentation

    • Documented the new evlog/eve integration and minor release.
  • Chores

    • Added eve-extension as a supported pull request scope.

@HugoRCD HugoRCD self-assigned this Aug 6, 2026
@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 82dd08e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
evlog Minor
@evlog/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 6, 2026 7:46pm
evlog-docs Ready Ready Preview, v0 Aug 6, 2026 7:46pm
evlog-render-lab Ready Ready Preview Aug 6, 2026 7:46pm
evlog-telemetry Ready Ready Preview Aug 6, 2026 7:46pm
just-use-evlog Ready Ready Preview Aug 6, 2026 7:46pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Eve instrumentation bridge

Layer / File(s) Summary
Instrumentation contract and context bridge
packages/evlog/src/eve/index.ts
Adds EvlogEveInstrumentationOptions and defineEvlogInstrumentation(). The integration forwards telemetry options, optionally runs setup, and maps tracked eve turns to evlog.request_id and evlog.session_id.
Integration validation and release wiring
packages/evlog/test/eve.test.ts, .changeset/eve-instrumentation-bridge.md, .github/pull_request_template.md, .github/workflows/semantic-pull-request.yml
Adds tests for context propagation, unavailable tracking, option forwarding, and setup. Documents the release and enables the eve-extension pull request scope.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: feature

Sequence Diagram(s)

sequenceDiagram
  participant EveTurn
  participant defineEvlogInstrumentation
  participant defineInstrumentation
  participant ModelCallSpan
  EveTurn->>defineEvlogInstrumentation: provide step-start event
  defineEvlogInstrumentation->>defineInstrumentation: register context mapper and options
  defineInstrumentation->>ModelCallSpan: apply evlog.request_id and evlog.session_id
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the template and does not explain the change, link an issue, or complete the checklist. Add a concise change summary, explain the problem and solution, link an issue if applicable, and complete the checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change and uses the repository’s allowed feat(eve) conventional commit format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch evl-217

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/evlog/src/eve/index.ts`:
- Around line 1361-1365: Remove the JSDoc comment immediately preceding the
private buildInstrumentationContext implementation, leaving the function and its
behavior unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bf38fb04-8e78-44ec-8915-13ec2b5fcdd9

📥 Commits

Reviewing files that changed from the base of the PR and between 7b8aec0 and 3ccd606.

⛔ Files ignored due to path filters (1)
  • packages/evlog/test/toolkit/__snapshots__/api-surface.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • .changeset/eve-instrumentation-bridge.md
  • .github/pull_request_template.md
  • .github/workflows/semantic-pull-request.yml
  • packages/evlog/src/eve/index.ts
  • packages/evlog/test/eve.test.ts

Comment on lines +1361 to +1365
/**
* Per-model-call context linking an AI SDK span back to the evlog wide event
* for the same turn. Returns `undefined` outside a tracked turn, which
* contributes no context rather than a half-filled one.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the private implementation comment.

buildInstrumentationContext is private. Its JSDoc restates behavior that the type and code express. Delete the comment.

As per coding guidelines, “Use comments only for constraints not expressible in code; do not paraphrase or narrate implementation.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/evlog/src/eve/index.ts` around lines 1361 - 1365, Remove the JSDoc
comment immediately preceding the private buildInstrumentationContext
implementation, leaving the function and its behavior unchanged.

Source: Coding guidelines

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant