evals(v4): OTEL/LangSmith + braintrust 3.x deps - #2757
Open
miguelg719 wants to merge 1 commit into
Open
Conversation
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Aug 17, 2026
Closed
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Architecture diagram
sequenceDiagram
participant E as Eval Runner
participant AI as AI SDK (ai module)
participant BT as Braintrust SDK
participant OTEL as OpenTelemetry SDK
participant LS as LangSmith
participant EXP as OTLP Exporter
participant API as External Tracing API
Note over E,API: Eval Tracing Infrastructure (v4)
E->>AI: import { generateText, generateObject, streamText, streamObject }
E->>AI: initialize AI SDK
Note over E,BT: Wrapped AI SDK layer
E->>BT: wrapAISDK(ai)
BT->>BT: Create wrapped AISDK client
BT-->>E: Wrapped client (typed via Pick)
E->>AI: Call wrapped generateText/generateObject/streamText/streamObject
Note over BT,OTEL: Braintrust OTEL integration
BT->>OTEL: Get global tracer (catalog: 1.9.1)
OTEL-->>BT: Shared tracer instance
BT->>OTEL: Create spans for AI operations
OTEL->>EXP: Export trace data via OTLP proto
EXP->>API: Send spans to configured collector
Note over BT,LS: LangSmith integration
BT->>LS: Initialize LangSmith client
LS->>LS: Configure trace processor
BT->>LS: Send trace data
LS->>API: Export to LangSmith backend
alt Trace export success
API-->>OTEL: Ack received
API-->>LS: Ack received
else Export failure
API-->>OTEL: Error
API-->>LS: Error
Note over OTEL,LS: Failures non-blocking, eval continues
end
E->>E: Process eval results
E-->>E: Return results (unchanged surface)
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-deps
branch
5 times, most recently
from
August 17, 2026 22:07
a1737fd to
f58c04f
Compare
miguelg719
force-pushed
the
miguelgonzalez/evals-v4-otel-deps
branch
from
August 17, 2026 22:34
f58c04f to
53a0364
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Retargets the LangSmith/OTEL eval-tracing work onto Stagehand 4.0. Stack 1/6 (deps).
What
langsmith,@opentelemetry/{api,sdk-trace-base,sdk-trace-node,exporter-trace-otlp-proto},@braintrust/otel; bumpbraintrust0.4→3.x.@opentelemetry/apipinnedcatalog:(1.9.1) to share the SDK's global tracer.wrapAISDKreturn-type inAISdkClientWrappedviaPick<typeof ai, …>.Testing
typecheck + unit + build green.
Base:
mainSummary by cubic
Adds OpenTelemetry and LangSmith tracing dependencies and upgrades
braintrustto 3.x to prepare evals v4 for distributed tracing. No runtime behavior change; only dependency and type updates.langsmith,@opentelemetry/{api,sdk-trace-base,sdk-trace-node,exporter-trace-otlp-proto},@braintrust/otel; movesbraintrustto runtime deps at^3.21.0.@opentelemetry/apiviacatalog:to share a single global tracer across the workspace.braintrustpostinstall via workspaceallowBuilds.braintrust: false.AISdkClientWrappedtypes forbraintrust3.x by derivingWrappedAIfromaiand castingwrapAISDK(ai); public surface unchanged.pnpm install.Written for commit 53a0364. Summary will update on new commits.