This guide covers both local development and production Grafana Cloud integration for OpenTelemetry tracing.
- Docker and Docker Compose
- Node.js application running
# Start Jaeger for trace collection and UI
docker-compose -f docker-compose.observability.yml up -d
# Verify services are running
docker-compose -f docker-compose.observability.yml ps# Set OpenTelemetry environment variables
export OTEL_TRACE_ENABLED=true
export OTEL_SERVICE_NAME=mee-node
export OTEL_ENV=development
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318# Start your application with tracing enabled
bun run startMake API requests to generate traces:
# Example API calls
curl -X GET http://localhost:3000/v1/infoJaeger UI: http://localhost:16686
- Search for service:
mee-node - View trace details, spans, and timing
- Analyze latency and dependencies
- Go to your Grafana Cloud instance
- Configuration → Data Sources → Add data source
- Select "Tempo"
- URL:
https://tempo-prod-us-central1.grafana.net:443(or your Tempo endpoint) - Authentication: Use your Grafana Cloud credentials
- Save & Test
For production, update your environment variables:
# Production OpenTelemetry configuration
export OTEL_TRACE_ENABLED=true
export OTEL_SERVICE_NAME=mee-node
export OTEL_ENV=production
export OTEL_EXPORTER_OTLP_ENDPOINT=https://tempo-prod-us-central1.grafana.net:443
export OTEL_EXPORTER_OTLP_HEADERS='{"Authorization": "Basic <your-tempo-credentials>"}'- Dashboards → Import
- Upload JSON: Use
dashboards/api-performance.json - Select Tempo data source
- Import
The latency dashboard includes:
- Request Rate - RPS from traces
- Latency Percentiles - P50, P90, P99
- Error Rate - Error percentage
- Business Logic Latency - Custom operations:
api.quoteapi.quote-permitapi.execapi.infoapi.explorergasEstimatorexecutorsimulatordebugTraceCallethCallpaymentServiceProviders
- Service Map - Automatic dependency visualization
Add to your Kubernetes values files:
# k8s/values.staging.yaml & k8s/values.prod.yaml
opentelemetry:
enable: true
serviceName: mee-node
env: staging # or production
exporterEndpoint: "https://tempo-prod-us-central1.grafana.net:443"
exporterHeaders: '{"Authorization": "Basic <your-credentials>"}'The deployment template automatically includes OpenTelemetry environment variables when enabled.
- Check environment variables are set
- Verify Jaeger is running:
docker-compose -f docker-compose.observability.yml ps - Check application logs for OpenTelemetry initialization
- Ensure API requests are being made
- Check Jaeger is accessible:
curl http://localhost:16686 - Verify port 16686 is not blocked
- Restart services:
docker-compose -f docker-compose.observability.yml restart
- Verify Tempo data source connection
- Check authentication credentials
- Ensure OTLP endpoint is correct
- Verify network connectivity to Grafana Cloud
- Local Development: Uses Jaeger for trace collection and UI
- Production: Uses Grafana Cloud Tempo for trace storage
- Dashboard: Pre-configured for your specific operations
- Versioning: Dashboard is versioned in
dashboards/api-performance.json