Environment variables override explicit configuration
atoulme opened this issue · 1 comments
atoulme commented
I've been playing with the Node.js SDK a bit. The doc states Function arguments take precedence over the corresponding environment variables.
However, the code here explicitly disregards the endpoint we set if SPLUNK_REALM
is set, with a warning:
diag.warn(
'OTLP span exporter factory: explicit endpoint ignored due to realm being set.'
);
The realm env var is wrongfully taking precedence in this case even though the priority should always be programmatic way, then env vars.
It looks like it should be the other way round then - if explicit endpoint is set, the realm is ignored and a warning is given that the realm would be ignored.