Skip to content

Commit a0cf9b2

Browse files
replace obsolete Activity RecordException with AddException
1 parent bb45e56 commit a0cf9b2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/services/gameapis/Codebreaker.CosmosCreate/ApIDbInitializer.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using Codebreaker.Data.Cosmos;
2+
23
using Microsoft.EntityFrameworkCore;
34
using Microsoft.EntityFrameworkCore.Infrastructure;
45
using Microsoft.EntityFrameworkCore.Storage;
5-
using Microsoft.Extensions.DependencyInjection;
6-
using Microsoft.Extensions.Hosting;
7-
using OpenTelemetry.Trace;
6+
87
using System.Diagnostics;
98

109
namespace Codebreaker.SqlServerMigration;
@@ -29,7 +28,7 @@ protected override async Task ExecuteAsync(CancellationToken cancellationToken)
2928
}
3029
catch (Exception ex)
3130
{
32-
activity?.RecordException(ex);
31+
activity?.AddException(ex);
3332
throw;
3433
}
3534

src/services/gameapis/Codebreaker.SqlServerMigration/ApIDbInitializer.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using Codebreaker.Data.SqlServer;
2+
23
using Microsoft.EntityFrameworkCore;
34
using Microsoft.EntityFrameworkCore.Infrastructure;
45
using Microsoft.EntityFrameworkCore.Storage;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.Extensions.Hosting;
7-
using OpenTelemetry.Trace;
8+
89
using System.Diagnostics;
910

1011
namespace Codebreaker.SqlServerMigration;
@@ -30,7 +31,7 @@ protected override async Task ExecuteAsync(CancellationToken cancellationToken)
3031
}
3132
catch (Exception ex)
3233
{
33-
activity?.RecordException(ex);
34+
activity?.AddException(ex);
3435
throw;
3536
}
3637

0 commit comments

Comments
 (0)