-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use OpenTelemetry tooling for diagnostics setup #638
base: main
Are you sure you want to change the base?
Conversation
Not removing package here as this is needed for tracking db performance. It's extracted into it's own issue https://github.com/Altinn/team-core-private/issues/165 |
src/Storage/Program.cs
Outdated
{ | ||
o.ConnectionString = applicationInsightsConnectionString; | ||
}) | ||
.AddProcessor(new DependencyFilterProcessor())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the placement. AddAzureMonitorTelemetryExporters isn't called unless we have an applicationInsightsConnectionString.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget it. I finally understood the purpose. Looks fine except the order. Documentation emphasis adding the processor before the call to AddAzureMonitorTraceExporter.
src/Storage/Program.cs
Outdated
services.ConfigureOpenTelemetryTracerProvider(tracing => tracing | ||
.AddAzureMonitorTraceExporter(o => | ||
{ | ||
o.ConnectionString = applicationInsightsConnectionString; | ||
}) | ||
.AddProcessor(new DependencyFilterProcessor())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work?
services.ConfigureOpenTelemetryTracerProvider(tracing => tracing | |
.AddAzureMonitorTraceExporter(o => | |
{ | |
o.ConnectionString = applicationInsightsConnectionString; | |
}) | |
.AddProcessor(new DependencyFilterProcessor())); | |
services.ConfigureOpenTelemetryTracerProvider(tracing => tracing | |
.AddProcessor(new DependencyFilterProcessor()) | |
.AddAzureMonitorTraceExporter(o => | |
{ | |
o.ConnectionString = applicationInsightsConnectionString; | |
})); |
|
Part of an ongoing work to export data for logging, monitoring, and tracing to Azure Monitor Telemetry for all of our applications.
Note that this setup will cause changes in log-levels for the following namespaces:
Console
Microsoft, LogLevel.Warning -> Information
System, LogLevel.Warning -> Information
ApplicationInsights:
Program.cs, LogLevel.Trace -> Warning
Related Issue(s)
#136
Verification
Documentation