From 93fd7d34a718278abfa533fa3e9436eb205cab88 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Thu, 7 Dec 2023 17:57:16 -0800 Subject: [PATCH] Doc fix for RecordException (#5143) --- src/OpenTelemetry.Api/Trace/ActivityExtensions.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs b/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs index 036d8c11a7c..d8ac769b9c9 100644 --- a/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs +++ b/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs @@ -57,20 +57,26 @@ public static Status GetStatus(this Activity activity) } /// - /// Adds an activity event containing information from the specified exception. + /// Adds an containing information from the specified exception. /// /// Activity instance. /// Exception to be recorded. + /// The exception is recorded as per specification. + /// "exception.stacktrace" is represented using the value of Exception.ToString. + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void RecordException(this Activity activity, Exception? ex) => RecordException(activity, ex, default); /// - /// Adds an activity event containing information from the specified exception and additional tags. + /// Adds an containing information from the specified exception and additional tags. /// /// Activity instance. /// Exception to be recorded. /// Additional tags to record on the event. + /// The exception is recorded as per specification. + /// "exception.stacktrace" is represented using the value of Exception.ToString. + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void RecordException(this Activity activity, Exception? ex, in TagList tags) {