Skip to content

Commit 6e342f4

Browse files
committed
Simplifying
1 parent a326e82 commit 6e342f4

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

lib/shared.bash

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -305,40 +305,8 @@ function run_docker_compose() {
305305
echo "DEBUG: TRACEPARENT: ${TRACEPARENT:-NOT SET}"
306306

307307
(
308-
# Save variables that need to be passed to containers
309-
local SAVED_TRACEPARENT="${TRACEPARENT:-}"
310-
local SAVED_TRACESTATE="${TRACESTATE:-}"
311-
local SAVED_OTEL_ENDPOINT="${OTEL_EXPORTER_OTLP_ENDPOINT:-}"
312-
local SAVED_OTEL_HEADERS="${OTEL_EXPORTER_OTLP_HEADERS:-}"
313-
local SAVED_OTEL_PROTOCOL="${OTEL_EXPORTER_OTLP_PROTOCOL:-}"
314-
315-
# Unset everything to disable docker-compose tracing
316-
unset TRACEPARENT
317-
unset TRACESTATE
318-
unset OTEL_EXPORTER_OTLP_ENDPOINT
319-
unset OTEL_EXPORTER_OTLP_HEADERS
320-
unset OTEL_EXPORTER_OTLP_PROTOCOL
321-
unset OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
322308
export OTEL_SDK_DISABLED=true
323309
export OTEL_TRACES_EXPORTER=none
324-
325-
# Restore all variables so they can be passed to containers via -e flags
326-
if [[ -n "$SAVED_TRACEPARENT" ]]; then
327-
export TRACEPARENT="$SAVED_TRACEPARENT"
328-
fi
329-
if [[ -n "$SAVED_TRACESTATE" ]]; then
330-
export TRACESTATE="$SAVED_TRACESTATE"
331-
fi
332-
if [[ -n "$SAVED_OTEL_ENDPOINT" ]]; then
333-
export OTEL_EXPORTER_OTLP_ENDPOINT="$SAVED_OTEL_ENDPOINT"
334-
fi
335-
if [[ -n "$SAVED_OTEL_HEADERS" ]]; then
336-
export OTEL_EXPORTER_OTLP_HEADERS="$SAVED_OTEL_HEADERS"
337-
fi
338-
if [[ -n "$SAVED_OTEL_PROTOCOL" ]]; then
339-
export OTEL_EXPORTER_OTLP_PROTOCOL="$SAVED_OTEL_PROTOCOL"
340-
fi
341-
342310
plugin_prompt_and_run "${command[@]}" "$@"
343311
)
344312
else

0 commit comments

Comments
 (0)