OpenTelemetry Integration

Locust can now connect to your OTel Platform!

Observable Load Testing is Here!

Locust is already a favorite load-testing tool for performance engineers, and it has the added advantage of being written in Python, a language already supported by OpenTelemetry! 🎉

Locust makes it easy to add OpenTelemetry to your load scripts! Simply export your OTel environment variables like so...

export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=https://...
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf

Install the optional dependencies...

pip install -U locust[otel]

and add the shiny new --otel flag!

OTel is available from Locust 2.42.4, make sure you're running the latest version!

See the documentation for more details!

After setting up your OTel integration, Locust will now automatically export traces and metrics from your load tests to any OTel-compatible backend (OTLP, Prometheus, Jaeger, Tempo, etc.).

Run a load test and inspect the results in your OTel dashboard to view the end-to-end traces and metrics sent from your load test!

OTel dashboard showing end-to-end spans exported from a locust load test

What's Your OTel Use Case?

  • Please reach out to us if you need any assistance! We're excited to announce this new feature and happy to hear any feedback!