diff --git a/docker/run-otelcol.sh b/docker/run-otelcol.sh index 66b0505b..a43700cf 100755 --- a/docker/run-otelcol.sh +++ b/docker/run-otelcol.sh @@ -4,11 +4,11 @@ source ./logging.sh secondary_config_file="" -if [[ -v OTEL_EXPORTER_OTLP_ENDPOINT ]]; then +if [[ -n ${OTEL_EXPORTER_OTLP_ENDPOINT} ]]; then echo "Also enabling OTLP/HTTP export to ${OTEL_EXPORTER_OTLP_ENDPOINT}" secondary_config_file="--config=file:./otelcol-config-export-http.yaml" - if [[ -v OTEL_EXPORTER_OTLP_HEADERS ]]; then + if [[ -n ${OTEL_EXPORTER_OTLP_HEADERS} ]]; then echo "Adding headers from OTEL_EXPORTER_OTLP_HEADERS" yaml_headers="{"