Skip to main content

Verifying OpenTelemetry (OTEL)

An OTEL pipeline is configured for Alloy. This means that any application can send metrics / logs / traces to Alloy via the OpenTelemetry standard.

To verify this, install Telemtrygen. You can run telemtrygen from your localhost to simulate a client which generates traces, logs and metrics.

1. Set-up a port-forward to Alloy

kubectl -n alloy port-forward svc/alloy 4317:4317

2. Generate traces

telemetrygen traces --otlp-insecure --rate 20 --duration 5s --otlp-endpoint localhost:4317

3. Generate logs

telemetrygen logs --otlp-insecure --rate 20 --duration 5s --otlp-endpoint localhost:4317

4. Generate metrics

telemetrygen metrics --otlp-insecure --rate 20 --duration 5s --otlp-endpoint localhost:4317

5. Visualize

You can visualize the generated traces, logs and metrics in Grafana. First open a port-forward:

kubectl -n grafana port-forward svc/grafana-service 3000:3000

# default username/pw = admin/admin

In Grafana, go to Explore and

  • select Tempo as datasource to view traces
  • select Loki as datasource to view logs - as label filter select job = telemetrygen
  • select Mimir as datasource to view metrics - as label filter select job = telemetrygen