Skip to content

Commit 2011b97

Browse files
committed
Stop use of deprecated method
1 parent dde5b9c commit 2011b97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Altinn.App.Core/Features/Telemetry/TelemetryActivityExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ internal static Activity SetProblemDetails(this Activity activity, ProblemDetail
345345
internal static void Errored(this Activity activity, Exception? exception = null, string? error = null)
346346
{
347347
activity.SetStatus(ActivityStatusCode.Error, error);
348-
activity.RecordException(exception);
348+
if(exception is not null)
349+
{
350+
activity.AddException(exception);
351+
}
349352
}
350353
}

0 commit comments

Comments
 (0)