Skip to content

Commit 6f4b952

Browse files
committed
Update shared.bash
1 parent 296f96c commit 6f4b952

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

lib/shared.bash

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,16 @@ function run_docker_compose() {
302302

303303
# Set OTEL service name to match the agent's service name so docker-compose
304304
# spans appear under buildkite-agent service instead of separate "compose" service
305-
# Use OTEL_RESOURCE_ATTRIBUTES which is the standard way to set service name
306305
if [[ -n "${BUILDKITE_TRACING_SERVICE_NAME:-}" ]]; then
307-
if [[ -z "${OTEL_RESOURCE_ATTRIBUTES:-}" ]]; then
308-
export OTEL_RESOURCE_ATTRIBUTES="service.name=${BUILDKITE_TRACING_SERVICE_NAME}"
309-
elif [[ ! "${OTEL_RESOURCE_ATTRIBUTES}" =~ service\.name ]]; then
310-
export OTEL_RESOURCE_ATTRIBUTES="${OTEL_RESOURCE_ATTRIBUTES},service.name=${BUILDKITE_TRACING_SERVICE_NAME}"
311-
fi
306+
export OTEL_SERVICE_NAME="${BUILDKITE_TRACING_SERVICE_NAME}"
312307
fi
313308

314309
if [[ "$disable_otel_config" == "true" ]]; then
315310
echo "~~~ :no_entry_sign: Disabling docker-compose OTEL traces"
316311

317312
# Disable OTEL for docker-compose process by unsetting all OTEL variables
318313
# We save them first so they can still be passed to containers via -e flags
319-
(
314+
(/Users/user/Downloads/pipeline-1_build_1043_otel-disabled.log
320315
# Unset OTEL variables to prevent docker-compose from creating traces
321316
unset TRACEPARENT
322317
unset TRACESTATE

0 commit comments

Comments
 (0)