Skip to content

Commit 296f96c

Browse files
committed
Update shared.bash
1 parent 566b6a0 commit 296f96c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/shared.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,15 @@ function run_docker_compose() {
329329
plugin_prompt_and_run "${command[@]}" "$@"
330330
)
331331
else
332-
# Docker Compose will auto-detect OTEL configuration from environment variables
333-
# Don't explicitly set COMPOSE_EXPERIMENTAL_OTEL=1 as it might conflict
334-
echo "DEBUG: Docker Compose OTEL auto-detection enabled via environment variables"
332+
# Enable docker-compose OTEL tracing explicitly
333+
# Docker Compose requires COMPOSE_EXPERIMENTAL_OTEL=1 to create traces
334+
echo "DEBUG: Docker Compose OTEL tracing enabled"
335335
echo "DEBUG: TRACEPARENT=${TRACEPARENT:-NOT SET}"
336336
echo "DEBUG: OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-NOT SET}"
337337
echo "DEBUG: OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-NOT SET}"
338338
echo "DEBUG: OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-NOT SET}"
339+
echo "DEBUG: Setting COMPOSE_EXPERIMENTAL_OTEL=1"
340+
export COMPOSE_EXPERIMENTAL_OTEL=1
339341
plugin_prompt_and_run "${command[@]}" "$@"
340342
fi
341343
}

0 commit comments

Comments
 (0)