Skip to main content
This guide explains how to send custom metrics to Metoro using OpenTelemetry. Metoro supports the OpenTelemetry Protocol (OTLP) for metric ingestion, allowing you to send metrics from any application or service that can export OpenTelemetry metrics.

Prerequisites

  • A Metoro account
  • An application configured with OpenTelemetry

High Level Overview

The Metoro exporter running in each cluster accepts metrics over OTLP/HTTP using protobuf or JSON payloads. The standard environment-variable configuration below uses the http/protobuf protocol.

Endpoint Configuration

Use the following OTLP base URL when your SDK or collector automatically appends the signal-specific path:
Alternatively, use the full metrics endpoint when configuring a signal-specific URL:
These endpoints use OTLP over HTTP and are available within the Kubernetes cluster where the Metoro exporter is installed. The older /api/v1/custom/otel/metrics endpoint remains available for compatibility, but new configurations should use the OTLP-compatible endpoints above. The Metoro exporter does not expose an OTLP/gRPC endpoint.

Authentication

No additional authentication is required when sending metrics from within the cluster to the Metoro exporter.

Reserved Names

Custom metric names must not collide with metrics generated by Metoro. Metoro drops custom OTLP metrics that use Metoro node-agent metric names, such as container_resources_cpu_usage_seconds_total or node_resources_memory_total_bytes. Names beginning with metoro_ are also reserved for Metoro-generated metrics.

Language-Specific Examples

Python

Here’s an example Python script that publishes deployment metrics to Metoro:
This script:
  1. Creates two gauge metrics:
    • custom_metrics.desired_replicas - The desired number of replicas for a deployment
    • custom_metrics.available_replicas - The number of available replicas for a deployment
  2. Includes a deployment attribute with the name of the deployment
  3. Uses the OpenTelemetry SDK to export metrics to Metoro

Go

Node.js

Via environment variables

Most OpenTelemetry SDKs support the generic OTLP environment variables. The SDK appends /v1/metrics to the base URL:

Metric Types

Metoro ingests and queries every OpenTelemetry metric type:
  1. Counter - A value that can only increase or be reset to zero. Queried as per-bucket increases, with counter resets handled automatically. Both cumulative and delta aggregation temporality are supported.
  2. UpDownCounter - A total that can go up and down (for example active requests or queue depth). Queried like a gauge: the values you see are the reported totals, not differences.
  3. Gauge - A value that can arbitrarily go up and down.
  4. Histogram - Tracks the distribution of values over time. Query with count, sum, or percentile(q) aggregations (for example percentile(0.99)).
  5. Exponential Histogram - The high-resolution histogram encoding used by many modern SDK configurations. Query with count, sum, or percentile(q); percentiles are computed from the exponential buckets with log-scale interpolation. Values at or below zero resolve to 0 in percentile results.
  6. Summary - Legacy pre-computed quantiles (commonly produced by Prometheus client libraries via the collector). Query with count, sum, or percentile(q); the nearest quantile reported by the producer is used, since summary quantiles cannot be interpolated or merged exactly.

Attributes and Context

When sending metrics via OpenTelemetry, you can include additional attributes that will be indexed and searchable in Metoro:
  • Use resource attributes to define static information about the service
  • Use metric attributes to include dynamic information with each metric value
  • Link metrics with traces using trace context propagation

Troubleshooting

If you encounter issues with OpenTelemetry metric ingestion:
  1. Verify your endpoint URL is correct
  2. Check your network connectivity to the Metoro OTLP endpoint
  3. Enable debug logging in your OpenTelemetry SDK
  4. Verify your metrics appear in the Metoro metrics view
  5. Contact support if issues persist

Additional Resources