Currently in azure application insights we see under severityLevel the number of ther severity level and not the text like information, error,… Is it possible to show the severityLevel as a string.
"Serilog": {
"Using": [
"Serilog.Sinks.ApplicationInsights"
],
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Information"
}
},
"WriteTo": [
{
"Name": "ApplicationInsights",
"Args": {
"restrictedToMinimumLevel": "Information",
"telemetryConverter": "Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters.TraceTelemetryConverter, Serilog.Sinks.ApplicationInsights",
"instrumentationKey": "key"
}
}
],
"Enrich": [
"FromLogContext"
],
"Properties": {
"Application": "Sample"
}
}
3
Answers
The severity level is an enum, see the docs:
Critical 4
Critical severity level.
Error 3
Error severity level.
Information 1
Information severity level.
Verbose 0
Verbose severity level.
Warning 2
Warning severity level.
We can use this to create a kusto query:
Ad hoc function, using let statement
Fiddle
Keep it simple.