Skip to main content

Braintrust

Braintrust is an evaluation and monitoring platform for LLM applications.

ConfigurationDirect link to Configuration

To use Braintrust with Mastra, configure these environment variables:

OTEL_EXPORTER_OTLP_ENDPOINT=https://api.braintrust.dev/otel
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <Your API Key>, x-bt-parent=project_id:<Your Project ID>"

ImplementationDirect link to Implementation

Here's how to configure Mastra to use Braintrust:

import { Mastra } from "@mastra/core";

export const mastra = new Mastra({
// ... other config
telemetry: {
serviceName: "your-service-name",
enabled: true,
export: {
type: "otlp",
},
},
});

DashboardDirect link to Dashboard

Access your Braintrust dashboard at braintrust.dev

On this page