File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,12 +302,19 @@ function run_docker_compose() {
302302
303303 if [[ " $disable_otel_config " == " true" ]]; then
304304 echo " ~~~ :no_entry_sign: Disabling docker-compose OTEL traces"
305- echo " DEBUG: TRACEPARENT: ${TRACEPARENT:- NOT SET} "
306- echo " DEBUG: OTEL_EXPORTER_OTLP_HEADERS: ${OTEL_EXPORTER_OTLP_HEADERS:- NOT SET} "
307- echo " DEBUG: OTEL_EXPORTER_OTLP_PROTOCOL: ${OTEL_EXPORTER_OTLP_PROTOCOL:- NOT SET} "
308305
306+ # Disable OTEL for docker-compose process by unsetting all OTEL variables
307+ # We save them first so they can still be passed to containers via -e flags
309308 (
309+ # Unset OTEL variables to prevent docker-compose from creating traces
310+ unset TRACEPARENT
311+ unset TRACESTATE
312+ unset OTEL_EXPORTER_OTLP_ENDPOINT
313+ unset OTEL_EXPORTER_OTLP_HEADERS
314+ unset OTEL_EXPORTER_OTLP_PROTOCOL
315+ unset OTEL_SERVICE_NAME
310316 export COMPOSE_EXPERIMENTAL_OTEL=0
317+
311318 plugin_prompt_and_run " ${command[@]} " " $@ "
312319 )
313320 else
You can’t perform that action at this time.
0 commit comments