-
Notifications
You must be signed in to change notification settings - Fork 752
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
[api] Mark ActivityExtensions.RecordException obsolete #5841
base: main
Are you sure you want to change the base?
[api] Mark ActivityExtensions.RecordException obsolete #5841
Conversation
@@ -110,6 +111,7 @@ public static void RecordException(this Activity? activity, Exception? ex) | |||
/// <remarks> The exception is recorded as per <a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/exceptions.md">specification</a>. | |||
/// "exception.stacktrace" is represented using the value of <a href="https://learn.microsoft.com/dotnet/api/system.exception.tostring">Exception.ToString</a>. | |||
/// </remarks> | |||
[Obsolete("Call Activity.AddException instead this method will be removed in a future version.")] |
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.
Should we replace the implementation of this method with a call to activity.AddException
?
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.
activity.AddException
is not available in version 8.0.0 and was only introduced starting from version 9.0.0-rc.1.24431.7. Should we consider upgrading our version to System.Diagnostics.DiagnosticSource v9.0.0-rc.1.24431.7
, or would we prefer to wait for the official release of v9.0.0?
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.
#5846 will be addressed soon by @rajkumar-rangaraj , so we can wait for that PR to merge first. @ysolomchenko or do you prefer to merge this as-is, and change the implementation to use actiity.AddException as a following after the other changes are in?
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.
I think it would be better to wait until #5846 is done before finishing that PR
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.
Just merged it 👍
@@ -97,6 +97,7 @@ public static Status GetStatus(this Activity? activity) | |||
/// <remarks> The exception is recorded as per <a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/exceptions.md">specification</a>. | |||
/// "exception.stacktrace" is represented using the value of <a href="https://learn.microsoft.com/dotnet/api/system.exception.tostring">Exception.ToString</a>. | |||
/// </remarks> | |||
[Obsolete("Call Activity.AddException instead this method will be removed in a future version.")] |
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.
can we explicitly call out that the end result is same when using the suggested alternative?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5841 +/- ##
==========================================
+ Coverage 83.38% 86.26% +2.87%
==========================================
Files 297 257 -40
Lines 12531 11168 -1363
==========================================
- Hits 10449 9634 -815
+ Misses 2082 1534 -548
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Fixes #5665
Changes
Mark ActivityExtensions.RecordException obsolete
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes