Application Insights OpenTelemetry fresh install not showing stack trace
I just installed Application Insights OpenTelemtery into a fresh copy of IdentityServer 7. I'm getting a 500 error on login. The error.type field shows
System.InvalidOperationException
, but no stack trace is shown.
Identity Server 7 comes with SeriLog installed by default. I'm not sure if that's somehow intercepting something but it seems as though if it can get the error.type, it should be able to get the stack trace.
Normally I see here a checkbox Just My Code
, and when I uncheck that, I see the full stack trace.
2 Replies
I used the following document to install OpenTelemetry: https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=aspnetcore#enable-azure-monitor-opentelemetry-for-net-nodejs-python-and-java-applications
I added the following line to my Program.cs
Before this Application Insights was receiving no data at all.
Enable OpenTelemetry in Application Insights - Azure Monitor
Learn how to enable OpenTelemetry (OTel) data collection in Application Insights for .NET, Java, Node.js, and Python applications using the Azure Monitor OpenTelemetry Distro.
Do you have a "APPLICATIONINSIGHTS_CONNECTION_STRING" environment variable with your instrumentation key?