Skip to content

Commit

Permalink
Missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
glucaci committed Jun 7, 2022
1 parent ba4927d commit 80dfc6f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Server/src/Core/IdOpsActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Diagnostics;
using IdOps.Messages;
using MassTransit;

namespace IdOps;

internal static class IdOpsActivity
{
private static readonly ActivitySource ActivitySource = new("IdOps");

public static Activity? StartEventBatchConsumer(ConsumeContext<Batch<IdentityEventMessage>> context)
{
Activity? activity = ActivitySource.StartActivity("IdentityServer Event BatchConsumer");

activity?.EnrichStartEventBatchConsumer(context);

return activity;
}

public static void EnrichStartEventBatchConsumer(
this Activity? activity,
ConsumeContext<Batch<IdentityEventMessage>> context)
{
activity?.SetTag("messaging.masstransit.batch_count", context.Message.Length);
}
}

0 comments on commit 80dfc6f

Please sign in to comment.