To send OpenTelemetry metrics and traces generated by OpenLIT from your AI Application to Prometheus and Grafana Tempo, follow the below steps.

1. Configure OpenTelemetry Collector

Prometheus + Tempo requires an OpenTelemetry Collector to route metrics to Prometheus and traces to Tempo. Install OpenTelemetry Collector (if not already running) For detailed installation instructions, refer to the OpenTelemetry Collector Documentation. Configure the Collector
  1. Configure OTLP Receiver: Set up receiver on 0.0.0.0:4318 for HTTP and 0.0.0.0:4317 for gRPC.
  2. Define Exporters:
    • prometheusremotewrite for metrics → Prometheus
    • otlp for traces → Tempo
  3. Assign to Pipelines: Route metrics and traces to appropriate backends.

2. Instrument your application

For Kubernetes deployments with zero-code instrumentation:
apiVersion: openlit.io/v1alpha1
kind: AutoInstrumentation
metadata:
  name: prometheus-tempo-instrumentation
  namespace: default
spec:
  selector:
    matchLabels:
      instrument: "true"
  python:
    instrumentation:
      provider: "openlit"
      version: "latest"
  otlp:
    endpoint: "YOUR_OTELCOL_URL:4318"
    timeout: 30
  resource:
    environment: "production"
    serviceName: "my-ai-service"
Replace:
  1. YOUR_OTELCOL_URL:4318 with the HTTP endpoint of your OpenTelemetry Collector.
    • Example: http://otel-collector.monitoring.svc.cluster.local:4318 (for in-cluster collector)
    • Example: http://127.0.0.1:4318 (for local development)
Ensure your OpenTelemetry Collector is properly deployed and configured to route metrics to Prometheus and traces to Tempo.
Refer to the OpenLIT Operator Documentation for more advanced configurations and use cases.

3. Import the pre-built Dashboard

  1. Log into your Grafana Instance. To install Grafana, refer to the Official documentation.
  2. Add Data Sources: Make sure Prometheus and Tempo are added as data sources in Grafana. To add a new data source, follow the steps in the Official documentation.
  3. Import Dashboard: Once Prometheus and Tempo are available as data sources in Grafana:
    • Click Dashboards in the primary menu
    • Click New and select Import in the drop-down menu
    • Copy the dashboard JSON provided in the accordion below
    • Paste the dashboard JSON text directly into the text area
    • Click Import
    • Save the dashboard