Skip to content

Config from an env var seems not to work #1529

@bobthemighty

Description

@bobthemighty

Describe the bug

The env confmap provider apparently allows one to read a config file from an environment variable, ie.

OPENTELEMETRY_COLLECTOR_CONFIG_URI=env:MY_CONF
MY_CONF=receivers...

This does work on the downstream ADOT layer, but seems not work with this layer. I can see that the confmap provider is included in the project, so am I doing something stupid? I don't want to use ADOT because a) it doesn't like the "batch" processor, and b) it regularly times out on init. To be fair, your docs mention that the URI can point to S3 or HTTP, but I don't have a good understanding of why this doesn't work if the env provider is in place.

Steps to reproduce

  • Add a yaml file to an environment var "MY_BEST_CONFIG"
  • Set the value of OPENTELEMETRY_COLLECTOR_CONFIG_URI to env:MY_BEST_CONFIG
  • Ship it.

What did you expect to see?
I expected to see my config applied

What did you see instead?
The default configuration was applied, I think.

What version of collector/language SDK version did you use?

What language layer did you use?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions