-
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
[Part3] Support Activity Status and status description in OTLP Exporter. #3100
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3100 +/- ##
==========================================
- Coverage 84.97% 84.82% -0.16%
==========================================
Files 259 259
Lines 9179 9185 +6
==========================================
- Hits 7800 7791 -9
- Misses 1379 1394 +15
|
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Reiley Yang <[email protected]>
Co-authored-by: Alan West <[email protected]>
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.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. I'd be ok with #3100 (comment) being a follow up if you'd prefer.
test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpTraceExporterTests.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 with some minor suggestions.
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.cs
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.
OTLP (#3094 (review))
Changes
Fixes parts of #2569.
Related to: #3003 and #3073
Background : Please review Console.Exporter where the same logic were exercised: #3061.
Added support for Activity.Status/Description in OTLP.Exporter.
System.Diagnostic.DiagnosticSource version 6.0.0 introduced native support for storing status/description in the Activity itself.
This PR modified the exporter to retrieve status from the newly added fields (Activity.Status and Activity StatusDescription) if they were set.
To maintain backward compatibility, the control flow would fell back to retrieve status from the activity.Tags if the native status/description were not set.
Prior to this PR if Status=Unset then the exporter would set both the status and description. This PR skipped setting status and statusDescription if the Status is Unset. Additionally, added statusDescription only if the Status=Error.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes