mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
Builds on #4127 by adding OpenTelemetry auto-instrumentation support to Docker images. After #4127 migrated to automatic instrumentation, the Docker images lacked the necessary dependencies. This PR installs the OTEL packages and enables instrumentation when any OTEL_* environment variable is set. Test Plan: Build image: docker build -f containers/Containerfile --build-arg DISTRO_NAME=starter --build-arg INSTALL_MODE=editable --tag llamastack/distribution-starter:otel-test . Run with trace propagation enabled (parentbased_traceidratio with 0.0 prevents new traces but allows propagation of incoming traces): docker run -p 8321:8321 -e OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4318 -e OTEL_SERVICE_NAME=llama-stack -e OTEL_TRACES_SAMPLER=parentbased_traceidratio -e OTEL_TRACES_SAMPLER_ARG=0.0 llamastack/distribution-starter:otel-test Ran a sample flight search agent. Traces successfully captured. Signed-off-by: Adrian Cole <adrian@tetrate.io> |
||
|---|---|---|
| .. | ||
| Containerfile | ||