a
This commit is contained in:
parent
042f736d71
commit
9af12bddc9
1 changed files with 2 additions and 11 deletions
|
@ -27,15 +27,7 @@ builder.Services.AddControllers()
|
||||||
.AddPlugins(PluginLoader.Assemblies);
|
.AddPlugins(PluginLoader.Assemblies);
|
||||||
|
|
||||||
builder.Services.AddSwaggerGenWithOptions();
|
builder.Services.AddSwaggerGenWithOptions();
|
||||||
builder.Services.AddLogging(logging => logging //.AddCustomConsoleFormatter()
|
builder.Services.AddLogging(logging => logging.AddCustomConsoleFormatter());
|
||||||
.ClearProviders()
|
|
||||||
.AddOpenTelemetry(p =>
|
|
||||||
{
|
|
||||||
p.IncludeScopes = true;
|
|
||||||
p.ParseStateValues = true;
|
|
||||||
p.IncludeFormattedMessage = true;
|
|
||||||
p.AddOtlpExporter();
|
|
||||||
}));
|
|
||||||
builder.Services.AddDatabaseContext(builder.Configuration);
|
builder.Services.AddDatabaseContext(builder.Configuration);
|
||||||
builder.Services.AddSlidingWindowRateLimiter();
|
builder.Services.AddSlidingWindowRateLimiter();
|
||||||
builder.Services.AddCorsPolicies();
|
builder.Services.AddCorsPolicies();
|
||||||
|
@ -48,6 +40,7 @@ builder.Services.AddServices();
|
||||||
builder.Services.ConfigureServices(builder.Configuration);
|
builder.Services.ConfigureServices(builder.Configuration);
|
||||||
|
|
||||||
builder.Services.AddOpenTelemetry()
|
builder.Services.AddOpenTelemetry()
|
||||||
|
.UseOtlpExporter()
|
||||||
.WithTracing(p => p.AddAspNetCoreInstrumentation())
|
.WithTracing(p => p.AddAspNetCoreInstrumentation())
|
||||||
.WithMetrics(p => p.AddAspNetCoreInstrumentation())
|
.WithMetrics(p => p.AddAspNetCoreInstrumentation())
|
||||||
.WithLogging(null, p =>
|
.WithLogging(null, p =>
|
||||||
|
@ -55,9 +48,7 @@ builder.Services.AddOpenTelemetry()
|
||||||
p.IncludeScopes = true;
|
p.IncludeScopes = true;
|
||||||
p.ParseStateValues = true;
|
p.ParseStateValues = true;
|
||||||
p.IncludeFormattedMessage = true;
|
p.IncludeFormattedMessage = true;
|
||||||
p.AddOtlpExporter();
|
|
||||||
});
|
});
|
||||||
//.UseOtlpExporter(OtlpExportProtocol.HttpProtobuf, new Uri("http://10.42.0.2:4318/"));
|
|
||||||
|
|
||||||
builder.WebHost.ConfigureKestrel(builder.Configuration);
|
builder.WebHost.ConfigureKestrel(builder.Configuration);
|
||||||
builder.WebHost.UseStaticWebAssets();
|
builder.WebHost.UseStaticWebAssets();
|
||||||
|
|
Loading…
Add table
Reference in a new issue