OT
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Musify.Infrastructure.Observability
|
||||
{
|
||||
public static class OpenTelemetryDependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddInfrastructureOpenTelemetry(this IServiceCollection serviceDescriptors)
|
||||
{
|
||||
serviceDescriptors
|
||||
.AddOpenTelemetry()
|
||||
.WithTracing(tracing =>
|
||||
{
|
||||
tracing.AddSource("MassTransit");
|
||||
} )
|
||||
.WithMetrics(metrics =>
|
||||
{
|
||||
metrics.AddMeter("MassTransit");
|
||||
} );
|
||||
|
||||
return serviceDescriptors;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user