Skip to content

Commit 93b436b

Browse files
authored
Merge pull request #1387 from danielgerlag/copilot/fix-d755df16-ff80-469e-9ebb-6e9604a6eee4
Update OpenTelemetry to 1.12.0 and fix breaking API changes
2 parents 0b0acef + fce2fc7 commit 93b436b

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

src/WorkflowCore/Services/BackgroundTasks/QueueConsumer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private async Task Execute()
122122
catch (Exception ex)
123123
{
124124
Logger.LogError(ex, ex.Message);
125-
activity?.RecordException(ex);
125+
activity?.AddException(ex);
126126
}
127127
finally
128128
{
@@ -158,7 +158,7 @@ private async Task ExecuteItem(string itemId, EventWaitHandle waitHandle, Activi
158158
catch (Exception ex)
159159
{
160160
Logger.LogError(default(EventId), ex, $"Error executing item {itemId} - {ex.Message}");
161-
activity?.RecordException(ex);
161+
activity?.AddException(ex);
162162
}
163163
finally
164164
{

src/WorkflowCore/Services/BackgroundTasks/RunnablePoller.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
8686
catch (Exception ex)
8787
{
8888
_logger.LogError(ex, ex.Message);
89-
activity?.RecordException(ex);
89+
activity?.AddException(ex);
9090
}
9191
}
9292
if (_greylist.Contains($"wf:{item}"))
@@ -108,7 +108,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
108108
catch (Exception ex)
109109
{
110110
_logger.LogError(ex, ex.Message);
111-
activity?.RecordException(ex);
111+
activity?.AddException(ex);
112112
}
113113
finally
114114
{
@@ -145,7 +145,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
145145
catch (Exception ex)
146146
{
147147
_logger.LogError(ex, ex.Message);
148-
activity?.RecordException(ex);
148+
activity?.AddException(ex);
149149
}
150150
}
151151
if (_greylist.Contains($"evt:{item}"))
@@ -167,7 +167,7 @@ await _persistenceStore.ScheduleCommand(new ScheduledCommand()
167167
catch (Exception ex)
168168
{
169169
_logger.LogError(ex, ex.Message);
170-
activity?.RecordException(ex);
170+
activity?.AddException(ex);
171171
}
172172
finally
173173
{
@@ -210,7 +210,7 @@ await _persistenceStore.ProcessCommands(new DateTimeOffset(_dateTimeProvider.Utc
210210
catch (Exception ex)
211211
{
212212
_logger.LogError(ex, ex.Message);
213-
activity?.RecordException(ex);
213+
activity?.AddException(ex);
214214
}
215215
finally
216216
{

src/WorkflowCore/Services/WorkflowActivity.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ internal static void Enrich(WorkflowExecutorResult result)
8383

8484
if (result?.Errors?.Count > 0)
8585
{
86-
activity.SetStatus(Status.Error);
8786
activity.SetStatus(ActivityStatusCode.Error);
8887
}
8988
}

src/WorkflowCore/Services/WorkflowHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public async Task StartAsync(CancellationToken cancellationToken)
105105
}
106106
catch (Exception ex)
107107
{
108-
activity.RecordException(ex);
108+
activity.AddException(ex);
109109
throw;
110110
}
111111
finally

src/WorkflowCore/WorkflowCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
2727
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
2828
<PackageReference Include="System.Linq.Queryable" Version="4.3.0" />
29-
<PackageReference Include="OpenTelemetry.Api" Version="1.1.0" />
30-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
29+
<PackageReference Include="OpenTelemetry.Api" Version="1.12.0" />
30+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0" />
3131
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
3232
<_Parameter1>WorkflowCore.IntegrationTests</_Parameter1>
3333
</AssemblyAttribute>

0 commit comments

Comments
 (0)