Skip to content

Commit

Permalink
fix: update OpenTelemetry configuration template to use index for env…
Browse files Browse the repository at this point in the history
…ironment variables
  • Loading branch information
simlarsen committed Jan 23, 2025
1 parent ea38e26 commit eb9e20d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OTelCollector/otel-collector-config.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ exporters:

service:
telemetry:
{{ if or (not .Env.OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT) (eq .Env.DISABLE_TELEMETRY "true") }}
{{ if or (not (index .Env "OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT")) (eq .Env.DISABLE_TELEMETRY "true") }}
logs:
level: "debug"
{{ end }}
{{ if and (ne .Env.DISABLE_TELEMETRY "true") .Env.OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT }}
{{ if and (ne .Env.DISABLE_TELEMETRY "true") (index .Env "OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT") }}
logs:
level: "debug"
metrics:
Expand Down

0 comments on commit eb9e20d

Please sign in to comment.