OpenTelemetry Metrics
Set OTEL_EXPORTER_OTLP_METRICS_ENDPOINT to your Sazabi intake URL to store OpenTelemetry metrics as searchable log records.
About
Send OpenTelemetry metrics to Sazabi and store them as searchable log records. Each metric data point becomes a record with structured fields including metric.name, metric.type, metric.unit, and metric.value, making metrics queryable alongside your logs and traces in the same thread.
This source is separate from the general OpenTelemetry source because Sazabi routes metrics to a dedicated intake path. Use this source when your SDK or collector emits metrics data.
Prerequisites
- An application or OpenTelemetry Collector configured to emit metrics
- Your Sazabi intake URL, shown above — open the log source and copy the Intake URL from its setup screen (the public key is embedded in the URL).
Set up in the dashboard
Enable or add the OpenTelemetry metrics SDK
If your application already uses an OpenTelemetry SDK, enable the metrics component. If you are using the OpenTelemetry Collector, add or confirm a prometheus or hostmetrics receiver and an otlphttp exporter.
Set the metrics exporter environment variables
Configure the following environment variables so they are present when the process starts:
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=<your intake URL>
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufYour intake URL is shown above. Set OTEL_EXPORTER_OTLP_METRICS_ENDPOINT specifically for metrics rather than the general OTEL_EXPORTER_OTLP_ENDPOINT so logs and traces can target a different endpoint if needed.
Redeploy the application
Restart or redeploy the application so it picks up the new environment variables.
Set up with the CLI
You can also register the OpenTelemetry Metrics log source with the Sazabi CLI (installed and authenticated — see CLI reference).
Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):
sazabi log-sources create otel_metrics --mode connectionlessThe command prints the intake URL for the new source — copy the whole URL and point your sender at it using the configuration shown above. Run sazabi log-sources get <log-source-id> at any time to reprint the endpoint, or sazabi log-sources list to see every log source in the project.
Verify
Emit a metric from your application or trigger a metrics scrape cycle. Open the Intake page in the Sazabi dashboard and confirm records from the OpenTelemetry Metrics source appear. Records typically arrive within a minute or two, or within one export interval if your SDK batches at a longer interval.
Start a thread in the dashboard and search for metric.name to confirm individual metric data points are queryable.
Troubleshooting
No records after redeploying — Confirm OTEL_EXPORTER_OTLP_METRICS_ENDPOINT is set in the correct process. Check for SDK initialization errors in application output.
Records arrive for logs/traces but not metrics — Verify you set OTEL_EXPORTER_OTLP_METRICS_ENDPOINT and not only the general OTEL_EXPORTER_OTLP_ENDPOINT. Some SDKs split metrics into a separate exporter that must be configured independently.
Missing metric fields — Histograms and summaries include metric.count, metric.sum, metric.min, and metric.max in addition to the base fields. Verify your SDK version supports those fields in OTLP exports.