> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Export metrics to an OTLP endpoint

> Send metrics from your Baseten deployments to your observability provider over OTLP.

Configure a metrics connection to send Baseten platform metrics and the metrics your deployments expose to your observability provider. Baseten uses the OpenTelemetry Protocol (OTLP) over [HTTP with Protocol Buffers encoding](https://opentelemetry.io/docs/specs/otlp/#otlphttp).

## What gets exported

A metrics connection sends the following metrics:

* **Platform metrics:** the request, latency, replica, CPU, and GPU metrics behind the Metrics tab. The [exported metrics reference](https://docs.baseten.co/observability/export-metrics/supported-metrics.md) lists their names, types, and labels.
* **Metrics your deployment exposes:** the Prometheus metrics your deployment serves, such as [vLLM and SGLang engine metrics](https://docs.baseten.co/observability/metrics.md#how-detection-works) and your own [custom metrics](https://docs.baseten.co/observability/export-metrics/custom-metrics.md#expose-a-prometheus-endpoint). Baseten reads them from `/metrics` on the model's serving port. To use another port or path, or to stop Baseten from collecting them, set [`metrics_endpoint`](https://docs.baseten.co/reference/truss-configuration#metrics_endpoint) in `config.yaml` and create a new deployment.

Baseten sends each metric under a resource that identifies its model and deployment with standard OpenTelemetry service attributes:

**service.name** `string`

Name of the model. Metrics without a model, such as Model APIs metrics, use `baseten`.

**service.namespace** `string`

Name of the team that owns the model.

**service.version** `string`

ID of the deployment that emitted the metric.

**deployment.environment.name** `string`

Name of the environment, when the deployment belongs to an environment.

Each metric also carries the following attributes:

**model\_id** `string`

ID of the model that emitted the metric.

**model\_name** `string`

Name of the model.

**deployment\_id** `string`

On platform metrics, the ID of the deployment that emitted the metric.

**model\_version\_id** `string`

On metrics your deployment exposes, the ID of the deployment that emitted the metric.

**team\_id** `string`

ID of the team that owns the model.

**environment** `string`

Name of the environment, when the deployment belongs to an environment.

**replica** `string`

On per-replica metrics, the ID of the replica that emitted the metric.

Metrics your deployment exposes also keep their own labels. Every metric from the connection carries `source="b10-telemetry-export"`. If your deployment sets a label with one of these names, Baseten keeps your value under `exported_<name>`, such as `exported_source`.

## Configure a connection

Each Baseten organization can have one metrics connection at a time, separate from the [logs connection](https://docs.baseten.co/observability/logs.md#export-logs-to-an-otlp-endpoint). The setting is organization-wide, so every team's metrics go to the same endpoint. If your organization already has a metrics connection, [edit it](#manage-the-connection).

Before you start, make sure you have organization admin access, your provider's HTTPS OTLP/HTTP metrics URL, and the authentication header name and credential. Check which temporality your provider accepts. The [integration notes](#integration-notes) list values for Honeycomb, Datadog, and Grafana Cloud.

Use one of the [supported endpoints](#supported-endpoints) to export platform metrics. Baseten includes platform metrics for existing deployments when the connection is active.

**To add a metrics connection**:

1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **General settings** under **Organization settings** in the sidebar.
2. In **OTEL connections**, choose **Add connection**.
3. Choose **Metrics**.
4. For **Endpoint URL**, type the full HTTPS URL of your OTLP/HTTP metrics receiver, including the path (`/v1/metrics` for most receivers).
5. For **Header name**, type the HTTP header your provider uses to authenticate.
6. For **Header value**, type the credential for that header. Baseten encrypts the value and keeps it hidden after you save it.
7. For **Temporality**, select the option your provider accepts for counters and histograms. **Cumulative** sends running totals. **Delta** sends the change since the previous point.
8. (Optional) Select **Enroll existing deployments** to collect engine and custom metrics from deployments created before you add the connection. Baseten automatically enrolls new deployments.
9. (Optional) Choose **Add header** to send another header with each export request. For **Header name** and **Header value** in the new row, type the extra header's name and value. You can add up to 3 headers.
10. (Optional) For a [supported endpoint](#supported-endpoints), choose **Test** to send a synthetic metric without saving. **Connection successful** confirms that your receiver accepted the test request.
11. Choose **Save**. For a supported endpoint, Baseten tests the connection before saving.

    If the test fails, check the error in the dialog, correct the values, and choose **Save** again. To keep the current values and skip the test, choose **Save anyway**.

When Baseten displays **Connection added**, [verify that your metrics arrive](#verify-the-connection). The connection test sends a JSON probe. Delivery verification checks the metrics your provider receives from the exporter.

## Verify the connection

Use a deployment that can receive inference requests. To verify engine or custom metrics, use a deployment that exposes them and that Baseten has enrolled. If you skipped **Enroll existing deployments** when adding the connection, use a deployment you created after adding it.

**To verify delivery**:

1. Send inference requests to the deployment you want to monitor.
2. If your receiver is on a [supported endpoint](#supported-endpoints), search your observability backend for `baseten_inference_requests_total` with `source="b10-telemetry-export"`. Filter by `model_id` and `deployment_id` and check that new points arrive.
3. If your deployment exposes engine or custom metrics, search for one of those metrics with `source="b10-telemetry-export"`. Filter by `model_id` and `model_version_id` and check that new points arrive. For per-replica metrics, use the `replica` attribute to identify the replica that emitted the point.

If gauges arrive but counters or histograms don't, choose **Edit connection** on the saved metrics connection and check that **Temporality** matches what your provider accepts.

### Supported endpoints

Baseten supports platform metrics export and **Test** for receivers on the following provider domains and services:

* `grafana.net`
* `datadoghq.com`
* `datadoghq.eu`
* `newrelic.com`
* `nr-data.net`
* `honeycomb.io`
* `dynatrace.com`
* `elastic.co`
* `axiom.co`
* `coralogix.com`
* `logz.io`
* `signalfx.com`
* `splunkcloud.com`
* `lightstep.com`
* `chronosphere.io`
* `signoz.cloud`
* `sentry.io`
* Amazon CloudWatch

## Manage the connection

**To update a metrics connection**:

1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **General settings** under **Organization settings** in the sidebar.
2. In **OTEL connections**, choose **Edit connection** for the metrics connection.
3. Update the fields you want to change. For **Header value**, type a new credential to rotate it or leave the field blank to keep the saved credential.
4. Choose **Save**.

Baseten displays **Connection updated** when it saves your changes. [Verify delivery](#verify-the-connection) after you update the connection.

**To stop metrics export**:

1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **General settings** under **Organization settings** in the sidebar.
2. In **OTEL connections**, choose **Delete connection** for the metrics connection.
3. Type `Delete` in the confirmation dialog.
4. Choose **Delete connection** to confirm.

Baseten displays **Connection deleted** and removes the metrics connection from **OTEL connections**.

## Integration notes

The endpoint and header values below come from each vendor's OTLP/HTTP documentation. Check those docs for the most current values for your account and region.

> [tab] Honeycomb
>
> Honeycomb accepts OTLP/HTTP at `https://api.honeycomb.io/v1/metrics` (or a region-specific host such as `https://api.eu1.honeycomb.io/v1/metrics`). Authenticate with an ingest API key:
>
> **Endpoint URL** `string` *required*
>
> `https://api.honeycomb.io/v1/metrics`
>
> **Header name** `string` *required*
>
> `x-honeycomb-team`
>
> **Header value** `string` *required*
>
> Your Honeycomb ingest API key.
>
> **Temporality** `string` *required*
>
> **Cumulative** or **Delta**.
>
> If your account requires an `x-honeycomb-dataset` header, add it as an additional header in the connection. See [Honeycomb's OpenTelemetry metrics documentation](https://docs.honeycomb.io/send-data/metrics/opentelemetry/) for dataset routing.

> [tab] Datadog
>
> Datadog accepts OTLP/HTTP metrics directly on its intake endpoint, so you don't need to run the Datadog Agent or an OpenTelemetry Collector. Authenticate with a Datadog API key:
>
> **Endpoint URL** `string` *required*
>
> The full OTLP metrics intake URL for your [Datadog site](https://docs.datadoghq.com/opentelemetry/setup/otlp_ingest/metrics/), including `/v1/metrics`. Select your site in the Datadog documentation to get the endpoint.
>
> **Header name** `string` *required*
>
> `dd-api-key`
>
> **Header value** `string` *required*
>
> An API key from your Datadog **Organization Settings > API Keys** page.
>
> **Temporality** `string` *required*
>
> **Delta**. Datadog's OTLP metrics intake accepts counters and histograms in delta temporality.
>
> See [Export metrics to Datadog](https://docs.baseten.co/observability/export-metrics/datadog.md) for the rest of the Datadog setup.

> [tab] Grafana Cloud
>
> Grafana Cloud exposes an OTLP gateway per stack. Use the gateway URL and basic auth token from your stack's **OpenTelemetry** connection page:
>
> **Endpoint URL** `string` *required*
>
> `https://otlp-gateway-<zone>.grafana.net/otlp/v1/metrics`
>
> **Header name** `string` *required*
>
> `Authorization`
>
> **Header value** `string` *required*
>
> `Basic <base64(instanceID:token)>`
>
> **Temporality** `string` *required*
>
> **Cumulative**.
>
> The exported metrics appear in Grafana Cloud Metrics, where you can query them with PromQL. See [Grafana Cloud's OTLP setup docs](https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/) for the exact gateway URL and token format.

For another backend, use its HTTPS OTLP/HTTP metrics endpoint and authentication header. The receiver must accept Protocol Buffers payloads.

## Use alongside the metrics endpoint

If you also scrape the organization [metrics endpoint](https://docs.baseten.co/observability/export-metrics/overview.md), the same platform metrics reach your backend twice. To avoid double counting, use one source per metric in each dashboard or alert. To select the metrics from this connection, filter on `source="b10-telemetry-export"`.
