open-telemetry / opentelemetry-erlang

OpenTelemetry Erlang SDK
https://opentelemetry.io
Apache License 2.0
325 stars 102 forks source link

Configuration file support and how to integrate with sys.config #769

Open tsloughter opened 5 days ago

tsloughter commented 5 days ago

OpenTelemetry has a new configuration file specification, example: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/examples/sdk-config.yaml that we need to support.

It is defined that if used by the user that environment variables (which can be substituted into the config) are ignored.

I think for easiest integration we have to also ignore sys.config but this may be contentious and confusing. Instead support a path to the file in the configuration but then if that is given we ignore the rest.

jamescarr commented 5 days ago

I think being intentrional is the best approach. If I am providing a configuration file in other applications I kind of presume it is going to ignore any environment variables unless they are used in string interpolation.