Skip to content

Commit

Permalink
Stop use of deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarne committed Nov 21, 2024
1 parent dde5b9c commit cdc5cc0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Altinn.App.Core.Models.Process;
using Altinn.Platform.Storage.Interface.Models;
using Microsoft.AspNetCore.Mvc;
using OpenTelemetry.Trace;
using InternalLabels = Altinn.App.Core.Features.Telemetry.InternalLabels;
using Labels = Altinn.App.Core.Features.Telemetry.Labels;

Expand Down Expand Up @@ -345,6 +344,9 @@ internal static Activity SetProblemDetails(this Activity activity, ProblemDetail
internal static void Errored(this Activity activity, Exception? exception = null, string? error = null)
{
activity.SetStatus(ActivityStatusCode.Error, error);
activity.RecordException(exception);
if(exception is not null)
{
activity.AddException(exception);
}
}
}

0 comments on commit cdc5cc0

Please sign in to comment.