Add braintrust.parent to OTEL baggage. This ensures that when using propagation inject() for distributed tracing, the braintrust.parent will be propagated via baggage to downstream services.
Copy braintrust.parent from span attribute to OTEL baggage. BraintrustSpanProcessor automatically sets braintrust.parent as a span attribute when OTEL spans are created within Braintrust contexts. This function copies that attribute to OTEL baggage so it propagates when using inject() for distributed tracing.
Create an OTEL context from a Braintrust span export string. Used for distributed tracing scenarios where a Braintrust span in one service needs to be the parent of an OTEL span in another service.
Extract a Braintrust-compatible parent string from W3C Trace Context headers. This converts OTEL trace context headers (traceparent/baggage) into a format that can be passed as the ‘parent’ parameter to Braintrust’s traced() method.
A trace exporter that sends OpenTelemetry spans to Braintrust. This exporter wraps the standard OTLP trace exporter and can be used with any OpenTelemetry setup, including @vercel/otel’s registerOTel function, NodeSDK, or custom tracer providers. It can optionally filter spans to only send AI-related telemetry. Environment Variables: - BRAINTRUST_API_KEY: Your Braintrust API key - BRAINTRUST_PARENT: Parent identifier (e.g., “project_name:test”) - BRAINTRUST_API_URL: Base URL for Braintrust API (defaults to https://api.braintrust.dev)
A span processor that sends OpenTelemetry spans to Braintrust. This processor uses a BatchSpanProcessor and an OTLP exporter configured to send data to Braintrust’s telemetry endpoint. Span filtering is disabled by default but can be enabled with the filterAISpans option. Environment Variables: - BRAINTRUST_API_KEY: Your Braintrust API key - BRAINTRUST_PARENT: Parent identifier (e.g., “project_name:test”) - BRAINTRUST_API_URL: Base URL for Braintrust API (defaults to https://api.braintrust.dev)