[exporter/datadog] API key validation neither succeeds nor fails when API key is passed in as env var with quotes v0.111.0+ #36509
Labels
bug
Something isn't working
exporter/datadog
Datadog components
needs triage
New item requiring triage
Component(s)
exporter/datadog
What happened?
Description
If Datadog API key is passed in with single and double quotations, e.g.
'"my-api-key"'
, Datadog exporter fails to validate but does not produce an error message. This causes 403 errors to be thrown when telemetry is sent to Datadog API and doesn't leave it clear what is happening.This also happens if it is passed in via env var and that env var contains double quotations
testfile.txt:
var=$(cat testfile.txt)
export DATADOG_API=$var
config.yaml:
Steps to Reproduce
follow export steps above, or manually set
api: '"my-api-key"'
in the config.yamlExpected Result
API key validates and exporter sends telemetry
Actual Result
api key validation starts but never completes. never fails either.
Collector version
v0.111.0 and onward
Environment information
Environment
OS: Ubuntu:noble
Compiler used linux/amd64 ubuntu package, collector contrib
OpenTelemetry Collector configuration
Log output
Additional context
something must have changed between v0.110.0 and v0.111.0+ on how environment variables are read into configuration maps.
The text was updated successfully, but these errors were encountered: