-
Notifications
You must be signed in to change notification settings - Fork 773
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
Enable zipkin endpoint configuration via environment variable #1924
Enable zipkin endpoint configuration via environment variable #1924
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1924 +/- ##
==========================================
+ Coverage 74.63% 79.10% +4.46%
==========================================
Files 217 217
Lines 6974 6987 +13
==========================================
+ Hits 5205 5527 +322
+ Misses 1769 1460 -309
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…ariable' of https://github.com/vishweshbankwar/opentelemetry-dotnet into vibankwa/Enable-Zipkin-Endpoint-Configuration-via-Env-Variable
…n-via-Env-Variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please handle possible Exception from reading Env variable.
…n-via-Env-Variable
…n-via-Env-Variable
…n-via-Env-Variable
test/OpenTelemetry.Exporter.Zipkin.Tests/ZipkinExporterTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cijothomas @vishweshbankwar this is something that we would like to have for auto-instrumentation. I see that it is not filling up the default in case of error parsing env var Uri (and related test) any other thing holding this change?
src/OpenTelemetry.Exporter.Zipkin/Implementation/ZipkinExporterEventSource.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides a nit for the README - @cijothomas now that 1.1.0 has shipped can we also merge this one?
@cijothomas Anything still blocking this one? |
…n-via-Env-Variable
{ | ||
this.Endpoint = new Uri(Environment.GetEnvironmentVariable(ZipkinEndpointEnvVar) ?? DefaultZipkinEndpoint); | ||
} | ||
catch (Exception ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor (may follow up in separate PR):
We can do similar to what Jaeger/OTLP does - catch SecurityException for reading env variable. Handle the Uri parse exception separately. Both should be logged as separate EventSource events.
This avoids catching the generic Exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure - will create a separate PR for that.
Fixes #.
#1453
Changes
Please provide a brief description of the changes here.
This PR partially covers #1453
Spec Details
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes