chore: some adjustments to tracing
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 30s
Build, Package and Push Images / sbom-scan (push) Successful in 41s
Build, Package and Push Images / container-build (push) Successful in 1m31s
Build, Package and Push Images / sonarqube (push) Successful in 1m33s
Build, Package and Push Images / container-sbom-scan (push) Successful in 32s
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 30s
Build, Package and Push Images / sbom-scan (push) Successful in 41s
Build, Package and Push Images / container-build (push) Successful in 1m31s
Build, Package and Push Images / sonarqube (push) Successful in 1m33s
Build, Package and Push Images / container-sbom-scan (push) Successful in 32s
This commit is contained in:
parent
b3a8aee1f7
commit
d15b1f8045
1 changed files with 3 additions and 4 deletions
|
@ -24,6 +24,8 @@ var builder = Host.CreateApplicationBuilder();
|
|||
builder.Environment.EnvironmentName = "Development";
|
||||
#endif
|
||||
|
||||
builder.Services.AddMetrics();
|
||||
|
||||
builder.Configuration.AddJsonFile("settings.json", true, true)
|
||||
.AddJsonFile($"settings.{builder.Environment.EnvironmentName}.json", true)
|
||||
.AddEnvironmentVariables().Build();
|
||||
|
@ -47,16 +49,13 @@ if (configuration.GetValue<bool>("Tracing:Enabled"))
|
|||
.WithTracing(tracing =>
|
||||
{
|
||||
tracing.AddSource(nameof(Server));
|
||||
tracing.SetSampler(new AlwaysOnSampler());
|
||||
tracing.AddMassTransitInstrumentation();
|
||||
//tracing.AddSource("MassTransit");
|
||||
tracing.AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true);
|
||||
tracing.AddHttpClientInstrumentation();
|
||||
tracing.AddNpgsql();
|
||||
})
|
||||
.WithMetrics(metrics =>
|
||||
{
|
||||
metrics.AddRuntimeInstrumentation();
|
||||
metrics.AddHttpClientInstrumentation();
|
||||
});
|
||||
|
||||
builder.Logging.AddOpenTelemetry(logging =>
|
||||
|
|
Loading…
Reference in a new issue