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

# Send Metrics to Bronto

> Send OpenTelemetry metrics to Bronto using OTLP over HTTP, exported directly from an OTel SDK or routed through an OpenTelemetry Collector.

Bronto accepts OpenTelemetry metrics over OTLP/HTTP. You can export metrics directly from an OpenTelemetry SDK or route them through an OpenTelemetry Collector before forwarding them to Bronto.

Bronto recommends enabling logs, metrics, and traces together so every service has a consistent telemetry pipeline. If you only need metrics, OpenTelemetry lets you enable the metrics exporter and pipeline independently.

## Supported metric types

| OpenTelemetry metric type | Support                 |
| ------------------------- | ----------------------- |
| Gauge                     | Supported               |
| Sum, including counters   | Supported               |
| Summary                   | Supported               |
| Explicit-bucket histogram | Supported               |
| Exponential histogram     | Not currently supported |

Bronto supports ingestion of sum and histogram metrics as delta or cumulative. Delta is strongly recommended to get the best value from the current set of supported functions.

<Warning>
  The Metric Explorer does not currently provide a Rate function. To visualize a rate, emit a rate metric from the source or precompute it in your telemetry pipeline before exporting it to Bronto.
</Warning>

## Prerequisites

Before you begin, you need:

* a Bronto API key with ingestion permissions
* your Bronto region: `eu` or `us`
* an application instrumented with an OpenTelemetry metrics SDK, or an OpenTelemetry Collector receiving metrics

## Endpoint and authentication

Use the metrics endpoint for your Bronto region:

| Region | Metrics endpoint                            |
| ------ | ------------------------------------------- |
| EU     | `https://ingestion.eu.bronto.io/v1/metrics` |
| US     | `https://ingestion.us.bronto.io/v1/metrics` |

Both endpoints accept OTLP/HTTP over HTTPS on port `443`, in either protobuf (`Content-Type: application/x-protobuf`) or JSON (`Content-Type: application/json`) encoding. Every request must include:

```text theme={"dark"}
x-bronto-api-key: <YOUR_API_KEY>
```

## Send metrics through an OpenTelemetry Collector

Configure an OTLP receiver and an OTLP/HTTP exporter that targets the Bronto metrics endpoint:

<Note>
  The example uses the standard Collector receiver ports: `4317` for OTLP/gRPC and `4318` for OTLP/HTTP. A same-host application typically exports OTLP/HTTP metrics to `http://localhost:4318/v1/metrics`; replace the host, port, protocol, and TLS settings when your deployment differs.
</Note>

```yaml otel-config.yaml theme={"dark"}
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:
  cumulativetodelta:
    initial_value: drop

exporters:
  otlphttp/brontometrics:
    metrics_endpoint: https://ingestion.<REGION>.bronto.io/v1/metrics
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [cumulativetodelta, batch]
      exporters: [otlphttp/brontometrics]
```

Replace `<REGION>` with `eu` or `us`.

If your Collector also sends logs and traces, add the Bronto metrics exporter to its `metrics` pipeline and keep the existing signal pipelines. Each signal uses its own endpoint.

## Send metrics directly from an SDK

For SDKs that support OTLP/HTTP configuration through environment variables:

```bash theme={"dark"}
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="https://ingestion.<REGION>.bronto.io/v1/metrics"
export OTEL_EXPORTER_OTLP_METRICS_HEADERS="x-bronto-api-key=<YOUR_API_KEY>"
export OTEL_METRICS_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
```

Configure a meter provider and periodic metric reader in your application. Use the [language-specific OpenTelemetry guides](/opentelemetry/overview) for SDK setup.

## Resource attributes

Set resource attributes once and share them across logs, metrics, and traces:

```bash theme={"dark"}
export OTEL_RESOURCE_ATTRIBUTES="service.name=checkout,service.namespace=production,deployment.environment.name=production"
```

At minimum, set `service.name` so metrics can be associated with the service that emitted them.

## Verify metric delivery

1. Open **Metric Explorer** in Bronto.
2. Select a recently emitted metric.
3. Confirm its service and resource attributes are present.
4. Compare the latest timestamp with the export interval configured in your SDK or Collector.

## Troubleshooting

If metrics do not appear:

* confirm the endpoint matches your Bronto region and ends in `/v1/metrics`
* confirm the `x-bronto-api-key` header is present
* confirm the Collector has an enabled `metrics` pipeline
* check that the SDK has a metric reader and exporter configured
* check Collector logs for rejected exponential histograms
* allow at least one SDK export interval before checking Metric Explorer

For a combined logs, metrics, and traces setup, see [Connect OpenTelemetry Collector to Bronto](/agent-setup/open-telemetry).

## Further reading

* [OpenTelemetry metrics concepts](https://opentelemetry.io/docs/concepts/signals/metrics/)
* [OpenTelemetry OTLP exporter configuration](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
* [Explore Metrics](/metrics/explore-metrics) — query, visualize, export, and monitor metrics after ingestion
