-
Notifications
You must be signed in to change notification settings - Fork 782
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
Updated Jaeger & Zipkin exporters to check for default activity.ParentSpanId #1433
Updated Jaeger & Zipkin exporters to check for default activity.ParentSpanId #1433
Conversation
@@ -55,5 +76,44 @@ protected void Application_End() | |||
{ | |||
this.tracerProvider?.Dispose(); | |||
} | |||
|
|||
private class DebugStreamWriter : StreamWriter |
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.
The .NET Framework example is a web application so I added this to redirect console output to the VS debug window.
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.
Might be a good addition to the ConsoleExporter.
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.
@reyang You thinking something like adding an option to have ConsoleExporter switch to Debug.Write instead of Console.Write?
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.
Yes, I see a general need for processes that don't have a "console", and I think having yet another "Debug stream exporter" might be an overkill.
In C++ we have "ostream exporter" which allows whatever output stream, and the default is STDOUT. And I think it is a good approach.
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.
Codecov Report
@@ Coverage Diff @@
## master #1433 +/- ##
==========================================
+ Coverage 81.83% 81.85% +0.01%
==========================================
Files 227 227
Lines 6089 6089
==========================================
+ Hits 4983 4984 +1
+ Misses 1106 1105 -1
|
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.
Changes
OtlpExporter was slightly smarter than Zipkin and Jaeger in how it handled activity.ParentSpanId. This makes the logic the same which should be a slight performance boost for root spans.