Applies to:
- Plan -
- Deployment -
Summary
Remote eval requests from the Braintrust UI do not include OpenTelemetry trace context headers (for example,traceparent or baggage). Braintrust does include request context in the request body so results attach to the Playground run. Start an OTel span inside your remote eval /eval handler and add the Braintrust parent payload, project ID, or your own run identifier as span attributes to correlate traces across your services.
What is happening
When the Braintrust UI calls a remote eval service, it sends eval context in the request body, including fields such asparent, project_id, data, parameters, and scores, but does not propagate OTel trace headers. If your eval handler then makes downstream calls, those calls will not share an incoming OTel trace unless you create or propagate a span yourself. This means distributed traces from the eval pod will be disconnected unless you instrument the eval handler.
Fix or suggestion
Start an OTel span in the eval handler
Steps:- Instrument your remote eval service with OpenTelemetry.
- In the
/evalhandler, start a span at the start of the request. - Add available Braintrust context from the request body as span attributes, such as
parent,project_id, or another stable run identifier your service controls. - Make downstream calls within the span so they appear as child spans.
How to confirm it worked
- Check your tracing backend for a span named like
remote-eval.requestand verify it contains attributes:braintrust.project_idand, when present,braintrust.parent. - Verify downstream spans appear as children with the same trace ID (or that trace IDs match between services when propagating
traceparent).