Skip to main content

A Locust plugin for emitting structured telemetry and metrics to JSON or OpenTelemetry backends.

Project description

Locust Telemetry

Tests Release codecov License Docs

Locust Telemetry is a modular observability plugin for the Locust load-testing framework.

It emits structured telemetry from load tests so you can correlate request behavior with system metrics using modern observability tools.

📖 Full documentation: https://locust-telemetry.readthedocs.io/en/stable/index.html


Why Locust Telemetry?

Load testing is most effective when request-level metrics can be correlated with system signals like CPU, memory, network usage, and errors.

Locust Telemetry bridges this gap by exporting structured telemetry that integrates cleanly with existing observability stacks.


Key Features

  • Structured Telemetry Test lifecycle events, request metrics, and system metrics

  • Multiple Backends JSON logs or OpenTelemetry metrics

  • OpenTelemetry Native OTLP export to Prometheus, Grafana, Datadog, New Relic, and more

  • Distributed Support Works with Locust master–worker mode

  • Extensible Design Add custom recorders and instruments

Traces and spans are planned but not yet supported.


Installation

pip install locust-telemetry

Quick Start

1. Initialize the plugin

In your locustfile.py:

from locust_telemetry import entrypoint

entrypoint.initialize()

2. Run Locust with telemetry enabled

JSON telemetry (logs):

locust -f locustfile.py --testplan mytest --enable-telemetry-recorder json

OpenTelemetry metrics:

locust -f locustfile.py --testplan mytest --enable-telemetry-recorder otel

➡️ See the Configuration section in the docs for all available options.


Local Demo (Docker)

A complete local observability stack is provided to quickly try both JSON and OpenTelemetry telemetry:

git clone https://github.com/platform-crew/locust-telemetry.git
cd locust-telemetry/examples/local
make build && make up

📘 Full walkthrough: https://locust-telemetry.readthedocs.io/en/stable/examples.html


Dashboard Preview

JSON Telemetry (Loki / Grafana Logs) JSON Dashboard JSON Dashboard

OpenTelemetry Metrics (Prometheus / Grafana) OTel Dashboard OTel Dashboard


Contributing

Contributions are welcome! Please see contributing for guidelines.


Author

Swaroop Shubhakrishna Bhat (@ss-bhat)

Thanks to all contributors ❤️


License

Licensed under the Apache License 2.0. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

locust_telemetry-2.1.1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

locust_telemetry-2.1.1-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file locust_telemetry-2.1.1.tar.gz.

File metadata

  • Download URL: locust_telemetry-2.1.1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for locust_telemetry-2.1.1.tar.gz
Algorithm Hash digest
SHA256 bb5235ec033b4a6cc272e2e6a29ab9f8343cc9c184d0e7a5f6e581a2d922d29f
MD5 07a011446d452624fdb0d36a6d7ec6f5
BLAKE2b-256 ae62f41c5551071223c1a391bdc83e01561044c9140058371a19aaf2136b90f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for locust_telemetry-2.1.1.tar.gz:

Publisher: release.yaml on platform-crew/locust-telemetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file locust_telemetry-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for locust_telemetry-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb590bf6fa2083c968b05b6e077c1d2f32e8b066c8d7744ed15df0ca615a935
MD5 4164c12edb4f090c9cafcbd9307c68b8
BLAKE2b-256 89b4639047af49879256e9a68594aee2ad7b4dfbd446cd1906c832e878179453

See more details on using hashes here.

Provenance

The following attestation bundles were made for locust_telemetry-2.1.1-py3-none-any.whl:

Publisher: release.yaml on platform-crew/locust-telemetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page