Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Jaeger Export should be configurable via the commonly used JAEGER_* environment variables #1071

Closed
chgl opened this issue Aug 13, 2020 · 1 comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

Comments

@chgl
Copy link

chgl commented Aug 13, 2020

Is your feature request related to a problem?
I wanted to set the service name via the JAEGER_SERVICE_NAME environment variable. Unfortunately, this was ignored and the default value "Open Telemetry Exporter" was used.

Describe the solution you'd like.

If the service name is not explicitly set via JaegerExporterOptions.ServiceName, it should check the common JAEGER environment vars before falling back to the default. The same should happen for the other env vars specified in jaegertracing.io/docs/1.18/client-features/ under "Tracer configuration via environment variables".

Describe alternatives you've considered.

Manually reading the env vars and setting them to JaegerExporterOptions.

Additional context.

This could be implemented in https://github.com/open-telemetry/opentelemetry-dotnet/blob/30f841b2eff8e47a3e680a7afbea3ab528faa5d2/src/OpenTelemetry.Exporter.Jaeger/JaegerExporterOptions.cs.

A quick:

public string ServiceName { get; set; } = Environment.GetEnvironmentVariable("JAEGER_SERVICE_NAME") ?? DefaultServiceName;

Could work, but does not handle cases where JAEGER_SERVICE_NAME exists but has no value set (ie calling export JAEGER_SERVICE_NAME=).

I'll gladly open a PR for this if the feature request is valid.

@chgl chgl added the enhancement New feature or request label Aug 13, 2020
@cijothomas cijothomas added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Oct 29, 2020
@cijothomas
Copy link
Member

Closing in favor of #1453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Projects
None yet
Development

No branches or pull requests

2 participants