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

Doc fix for RecordException #5143

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/OpenTelemetry.Api/Trace/ActivityExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,26 @@ public static Status GetStatus(this Activity activity)
}

/// <summary>
/// Adds an activity event containing information from the specified exception.
/// Adds an <see cref="ActivityEvent"/> containing information from the specified exception.
/// </summary>
/// <param name="activity">Activity instance.</param>
/// <param name="ex">Exception to be recorded.</param>
/// <remarks> The exception is recorded as per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/exceptions.md.
cijothomas marked this conversation as resolved.
Show resolved Hide resolved
/// "exception.stacktrace" is represented using the value of https://learn.microsoft.com/dotnet/api/system.exception.tostring.
cijothomas marked this conversation as resolved.
Show resolved Hide resolved
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void RecordException(this Activity activity, Exception? ex)
=> RecordException(activity, ex, default);

/// <summary>
/// Adds an activity event containing information from the specified exception and additional tags.
/// Adds an <see cref="ActivityEvent"/> containing information from the specified exception and additional tags.
/// </summary>
/// <param name="activity">Activity instance.</param>
/// <param name="ex">Exception to be recorded.</param>
/// <param name="tags">Additional tags to record on the event.</param>
/// <remarks> The exception is recorded as per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/exceptions.md.
/// "exception.stacktrace" is represented using the value of https://learn.microsoft.com/dotnet/api/system.exception.tostring.
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void RecordException(this Activity activity, Exception? ex, in TagList tags)
{
Expand Down