locust icon indicating copy to clipboard operation
locust copied to clipboard

Docker image does not have OTEL libraries installed

Open mcumming opened this issue 4 months ago • 1 comments

Prerequisites

Description

When I enable OTEL via the instructions at https://www.locust.cloud/blog/observable-load-testing/ I get the following error when starting the container with the --otel flag: [2025-12-05 18:53:37,231] e4744a99b8a5/ERROR/locust.opentelemetry: OpenTelemetry SDK is not installed, opentelemetry not enabled. Run 'pip install locust[otel]'

Command line

docker run locustio/locust:latest --host https://host.docker.internal:49942 --users 10 --spawn-rate 2 --run-time 300s --locustfile /mnt/locust/Load --processes -1 --otel

Locustfile contents

Issue triggers before needing a file

Python version

whatever is in the container

Locust version

2.42.6

Operating system

linux

mcumming avatar Dec 05 '25 19:12 mcumming

Hmm... Not sure what the best solution here is - I dont think we want to install OTel for everyone by default.

For now I think you'll need to build your own image, so using a Dockerfile like this:

FROM locustio/locust
RUN pip install locust[otel]

I guess we could provide an otel-enabled image too.

cyberw avatar Dec 05 '25 19:12 cyberw