This commit is contained in:
Laura Hausmann 2024-07-25 23:40:32 +02:00
parent 223e927055
commit 68804ec3cc
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -33,6 +33,11 @@ builder.Services.AddLogging(logging => logging.AddCustomConsoleFormatter()
p.IncludeScopes = true;
p.ParseStateValues = true;
p.IncludeFormattedMessage = true;
p.AddOtlpExporter(o =>
{
o.Protocol = OtlpExportProtocol.HttpProtobuf;
o.Endpoint = new Uri("http://10.42.0.2:4318/");
});
}));
builder.Services.AddDatabaseContext(builder.Configuration);
builder.Services.AddSlidingWindowRateLimiter();
@ -53,6 +58,11 @@ builder.Services.AddOpenTelemetry()
p.IncludeScopes = true;
p.ParseStateValues = true;
p.IncludeFormattedMessage = true;
p.AddOtlpExporter(o =>
{
o.Protocol = OtlpExportProtocol.HttpProtobuf;
o.Endpoint = new Uri("http://10.42.0.2:4318/");
});
})
.UseOtlpExporter(OtlpExportProtocol.HttpProtobuf, new Uri("http://10.42.0.2:4318/"));