-
I'm trying to setup the otel collector as a Windows Service. As part of that, I want to load part of the config using an exporters:
logging:
verbosity: detailed
otlp/openobserve:
endpoint: apm.example.com:5081
headers:
Authorization: Basic ${env:OTEL_AUTH} I tried putting this in a How can I get the otel collector to read this env var from another file? Or can I somehow pass it on the command line? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@cocowalla while searching other thing I found this discussion. I suppose that by now you already found the solution. For the record here is a suggestion on how to do it:
On this multistring value each line represents an environment variable visible only to the specific service. The syntax of each line is the name of the environment variable followed by an For example, for
|
Beta Was this translation helpful? Give feedback.
-
@pjanotti yes, I did eventually figure it out, but I totally forgot to update this discussion with the solution, so thanks for that! 🙏 |
Beta Was this translation helpful? Give feedback.
@cocowalla while searching other thing I found this discussion. I suppose that by now you already found the solution. For the record here is a suggestion on how to do it:
REG_MULTI_SZ
registry value namedEnvironment
underHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<service-name-that-you-used-for-the-otel-collector>
On this multistring value each line represents an environment variable visible only to the specific service. The syntax of each line is the name of the environment variable followed by an
=
, everything after the sign until the end of the line is the value of the environment variable.For example, for
OTEL_AUTH
add a line like: