Prerequisites
- A Metoro account
- An application configured with OpenTelemetry
High Level Overview
The Metoro exporter running in each cluster is a fully compliant OpenTelemetry collector. This means that you can send metrics to Metoro using any OpenTelemetry compatible metrics library.Endpoint Configuration
Configure your OpenTelemetry exporter to send metrics to:Authentication
No additional authentication is required when sending metrics from within the cluster to the Metoro exporter.Language-Specific Examples
Python
Here’s an example Python script that publishes deployment metrics to Metoro:- Creates two gauge metrics:
custom_metrics.desired_replicas
- The desired number of replicas for a deploymentcustom_metrics.available_replicas
- The number of available replicas for a deployment
- Includes a
deployment
attribute with the name of the deployment - Uses the OpenTelemetry SDK to export metrics to Metoro
Go
Node.js
Metric Types
OpenTelemetry supports several metric types that you can use:- Counter - A value that can only increase or be reset to zero
- Gauge - A value that can arbitrarily go up and down
- Histogram - Tracks the distribution of values over time
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:- Verify your endpoint URL is correct
- Check your network connectivity to the Metoro OTLP endpoint
- Enable debug logging in your OpenTelemetry SDK
- Verify your metrics appear in the Metoro metrics view
- Contact support if issues persist