Skip to main content
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 as parent, 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:
  1. Instrument your remote eval service with OpenTelemetry.
  2. In the /eval handler, start a span at the start of the request.
  3. Add available Braintrust context from the request body as span attributes, such as parent, project_id, or another stable run identifier your service controls.
  4. Make downstream calls within the span so they appear as child spans.
TypeScript (minimal):
Python (minimal):

How to confirm it worked

  • Check your tracing backend for a span named like remote-eval.request and verify it contains attributes: braintrust.project_id and, 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).

Notes