Configure alternative host to "localhost"
Is your feature request related to a problem? Please describe.
Telemetry is sent to localhost by default. According to the docs, changing this requires setting half a dozen different environment variables that individually configure where each kind of telemetry goes.
During development, I run the Jaeger all-in-one container via Docker Compose as a service I'm calling otel. I'd rather not have to configure a slew of environment variables, and I'd rather not have to expose host ports just so that this agent can use localhost.
Describe the solution you'd like
I'd like to have an environment variable that lets me specify an alternative to localhost as the default host name for all telemetry. Setting this variable would change only the host name, and would have no effect on protocol, port number, or URI path.
In my setup, I'd set this to otel, and this would send all telemetry to my Jaeger container without having to expose any host ports.
Describe alternatives you've considered
- Exposing host ports. This doesn't work in all environments (eg. running a Linux VM in Windows) and can cause needless port conflicts if, for example, you want to try running two of these setups at the same time.
- Setting all the environment variables for the individual telemetry types. This results in a lot of boilerplate code that would need to be maintained in the future when telemetry types are added or modified.
It sounds like you're using the jaeger exporter, yet you've linked to docs for configuring the OTLP exporter. The minimal set of env vars needed to configure the jaeger exporter for traces is just two:
OTEL_TRACES_EXPORTER=jaeger
OTEL_EXPORTER_JAEGER_ENDPOINT=<endpoint>
It doesn't sound like you want metrics, so you'd need to additionally disable the metrics exporter, which defaults to otlp:
OTEL_METRICS_EXPORTER=none
To address the part about host ports, if you're using docker compose to run both jaeger and your application you don't need to assign a host port. Both services will be part of the same docker network and the application can export to jaeger over a stable port that doesn't have to contend with port usage on the host.
This issue was marked stale due to lack of author feedback. It will be closed in 7 days.
@prdoyle Did @jack-berg 's answer get your problem solved? If so, let's close this out. Thanks!
This issue was marked stale due to lack of author feedback. It will be closed in 7 days.
Sorry to ghost you @jack-berg! Yes, that worked! FYI @breedx-splk