OpenTelemetry Integration
This guide explains how to send distributed traces to Metoro using OpenTelemetry. Metoro supports the OpenTelemetry Protocol (OTLP) for trace ingestion, allowing you to send traces from any application or service that can export OpenTelemetry traces.
Prerequisites
- A Metoro account
- An application configured with OpenTelemetry
Pricing
Custom traces are billed at $0.30 per GB.
High Level Overview
The metoro exporter running in each cluster is a fully compliant OpenTelemetry collector. This means that you can send traces to Metoro using any OpenTelemetry compatible tracing library.
Endpoint Configuration
Configure your OpenTelemetry exporter to send traces to:
This endpoint is available within your Kubernetes cluster where the Metoro exporter is installed.
Authentication
No additional authentication is required when sending traces from within the cluster to the Metoro exporter.
OpenTelemetry Collector Configuration
If you’re using the OpenTelemetry Collector to forward traces to Metoro, here’s an example configuration:
This configuration:
- Receives traces via OTLP over both HTTP (4318) and gRPC (4317)
- Batches traces for efficient transmission
- Forwards traces to the Metoro exporter
- Uses insecure communication since we’re within the cluster
Language-Specific Examples
Go
Python
Node.js
Attributes and Context
When sending traces 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 span attributes to include dynamic information with each span
- Link spans with logs using trace context propagation
- Add custom attributes to spans for business-specific data
Best Practices
- Sampling: Configure appropriate sampling rates based on your traffic volume
- Span Names: Use descriptive span names that identify the operation
- Error Handling: Set span status to error when exceptions occur
- Attributes: Add relevant attributes but avoid excessive data
- Context Propagation: Properly propagate trace context across service boundaries
Troubleshooting
If you encounter issues with OpenTelemetry trace 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 traces appear in the Metoro traces view
- Contact support if issues persist
Additional Resources
Was this page helpful?