Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils): configure open telemetry tracing for masstransit in aspnet package #1344

Merged
merged 6 commits into from
Oct 24, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace Digdir.Library.Utils.AspNet;

public static class AspNetUtilitiesExtensions
{
private const string MassTransitSource = "MassTransit";

public static IServiceCollection AddAspNetHealthChecks(this IServiceCollection services, Action<AspNetUtilitiesSettings, IServiceProvider>? configure = null)
{
var optionsBuilder = services.AddOptions<AspNetUtilitiesSettings>();
Expand Down Expand Up @@ -67,6 +69,7 @@ public static WebApplicationBuilder ConfigureTelemetry(this WebApplicationBuilde

tracing.AddHttpClientInstrumentation();
tracing.AddNpgsql();
tracing.AddSource(MassTransitSource); // MassTransit ActivitySource
})
.WithMetrics(metrics =>
{
Expand Down
Loading