-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue using environment variable for pipelines #10799
Comments
Tagging @mx-psi @TylerHelmuth per Slack request. |
@kago-dk Could you share the exact value of your |
Failed attempt at reproducing this (edited for clarity):
|
The content respectively is [filelog,windowseventlog/application] and [splunk_hec,otlphttp/loki/abcd] for OTEL_LOGS_RECEIVER and OTEL_LOGS_EXPORTER. The values are set at Windows Environment Variables and not used elsewhere in the Otel Configuration. I load the pipeline section into otel-config.yaml.
If I paste the content from pipelines.yaml into otel-config.yaml (instead of using ${file:${env:ProgramFiles}/otelcol/pipelines/pipelines.yaml}) then the Collector is able to start up. It sounds like the issue is resolved in 0.107.0 as part of a different ticket? |
Yes, I think this is a duplicate of #10787. I am going to add a test case for this to verify it |
Describe the bug
Environment variables used for pipelines are not processed correctly in 0.106.1, while they worked in 0.105.0. I have tried to put the value in double quotes and disable the confmap.strictlyTypedInput feature gate without success.
I a receiving an error instead.
When using confmap.strictlyTypedInput
failed to get config: cannot resolve the configuration: expanding ${env:OTEL_LOGS_RECEIVER}: retrieved value does not have unambiguous string representation: [filelog windowseventlog/application]
When using -confmap.strictlyTypedInput
failed to get config: cannot resolve the configuration: expanding ${env:OTEL_LOGS_RECEIVER}: expected convertable to string value type, got ["filelog" "windowseventlog/application"]([]interface {})
What version did you use?
0.106.1
What config did you use?
With [filelog,windowseventlog/application] as the environment value for OTEL_LOGS_RECEIVER as an example.
Environment
Windows 2022 Server
The text was updated successfully, but these errors were encountered: