Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
simaoribeiro committed Oct 17, 2023
1 parent 2e2a718 commit 9c38849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static Task OnConsumeStarted(IMessageContext context)
activity?.AddBaggage(item.Key, item.Value);
}

Activity.Current = activity;

context?.Items.Add(ActivitySourceAccessor.ActivityString, activity);

ActivitySourceAccessor.SetGenericTags(activity);
Expand All @@ -57,7 +59,7 @@ public static Task OnConsumeCompleted(IMessageContext context)
{
if (context.Items.TryGetValue(ActivitySourceAccessor.ActivityString, out var value) && value is Activity activity)
{
//activity?.Stop();
activity?.Stop();
}

return Task.CompletedTask;
Expand All @@ -71,7 +73,7 @@ public static Task OnConsumeError(IMessageContext context, Exception ex)

activity?.AddEvent(exceptionEvent);

//activity?.Stop();
activity?.Stop();
}

return Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static Task OnProducerCompleted(IMessageContext context)
{
if (context.Items.TryGetValue(ActivitySourceAccessor.ActivityString, out var value) && value is Activity activity)
{
//activity?.Stop();
activity?.Stop();
}

return Task.CompletedTask;
Expand All @@ -81,7 +81,7 @@ public static Task OnProducerError(IMessageContext context, Exception ex)

activity?.AddEvent(exceptionEvent);

//activity?.Stop();
activity?.Stop();
}

return Task.CompletedTask;
Expand Down

0 comments on commit 9c38849

Please sign in to comment.