The endpoint
Configure any OpenTelemetry SDK exporter with two environment variables:
What is recognized
The ingestion layer reads the conventions below with no configuration. A span carrying attributes from more than one vocabulary is fine; thegateway.* namespace wins when two disagree.
Braintrust
span_attributes.type values map to observation types: llm becomes a generation, tool a tool call, task and function spans, eval and score evaluator observations.
Where a trace came from
Every trace and observation recordsgateway.otel.source in its metadata. The value is detected from the instrumentation scope name and attribute namespaces (braintrust, openinference, otel-genai, langsmith, and so on). Set gateway.otel.source yourself as a span or resource attribute to override detection with any label, for example galileo. Filter on that metadata key to compare providers side by side.
Sessions
A span’s session id is read fromsession.id, gen_ai.conversation.id, langfuse.session.id, or gateway.session.id, on the span first and then on the resource. Exporters that keep the session elsewhere (Braintrust stores it in braintrust.metadata) can add a session.id span attribute, or the whole export can be forced into one session with gateway traces import --session. Traces sharing a session id are grouped into one session automatically.
Link imported traces to a world
World sessions run on the platform write flat metadata that the UI, evaluators, and exports understand. Imported traces join the same views when they carry the same keys, either on each span or once on the OTLP resource:
Resource-level values are hoisted onto every trace and observation, so an exporter that cannot set per-span attributes can still link a whole run by tagging its resource.
Import an export file
When the source cannot stream to you but can export OTLP/JSON (an OpenTelemetry collectorfile exporter, a saved API response, a fixture), push the file with the CLI:
traces import accepts one request document ({"resourceSpans": [...]}), a bare resourceSpans array, a JSON array of requests, or JSONL with one request per line, and reads stdin with -. The --source, --world, --world-version, --task, --session, --environment, and --attr key=value flags add resource attributes; a span’s own attributes always take precedence. Use --dry-run to parse and count without sending.
The command posts to the same
/api/public/otel/v1/traces endpoint your SDKs use, with the same GATEWAY_HOST / GATEWAY_PUBLIC_KEY / GATEWAY_SECRET_KEY credentials or the saved gateway auth login.Example: Braintrust
Braintrust’s OpenTelemetry exporter emitsbraintrust.* attributes. Point it at Surface Area:
chat with model gpt-4o, input and output preserved, usage 12/7, the metadata object kept, and gateway.otel.source: braintrust.
Example: Arize, Phoenix, or Galileo through OpenInference
OpenInference instrumentors (openinference-instrumentation-*) attach openinference.span.kind, input.value, output.value, llm.*, session.id, and user.id. Configure their tracer provider with an OTLP exporter aimed at the endpoint above; no Surface Area SDK is required. Galileo’s OpenTelemetry integration uses the same conventions plus the OpenTelemetry GenAI attributes, both of which are read.
Related
- Export to Surface Area for the SDK’s own exporter configuration.
- Sessions & traces for how sessions group traces.
- Metadata & identity for
gateway.*attributes you can set from any exporter.