Closed
Description
Describe the bug
The issue is similar to #10552 (comment) still can be hit if an expansion is part of a map value.
Steps to reproduce
Run collector with a config like:
receivers:
otlp:
protocols:
grpc:
http:
exporters:
otlphttp:
traces_endpoint: "example.com:4317"
headers:
"AUTH-TOKEN": "${AUTH_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp]
and AUTH_TOKEN
env var set to 123
What did you expect to see?
Collector to start.
What did you see instead?
Collector fails with
Error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):
error decoding 'exporters': error reading configuration for "otlphttp": decoding failed due to the following error(s):
'headers[AUTH-TOKEN]' expected type 'configopaque.String', got unconvertible type 'int', value: '123'
2024/08/20 21:23:23 collector server run finished with error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):
error decoding 'exporters': error reading configuration for "otlphttp": decoding failed due to the following error(s):
'headers[AUTH-TOKEN]' expected type 'configopaque.String', got unconvertible type 'int', value: '123'
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done