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/protobufInstall 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!
