serilog-contrib / serilog-sinks-applicationinsights

A Serilog sink that writes events to Microsoft Azure Application Insights
Apache License 2.0
220 stars 72 forks source link

Severity level is represented as a number #203

Closed micgruber closed 2 years ago

micgruber commented 2 years ago

Description

Currently in azure application insights we see under severityLevel the number of ther severity level and not the text like information, error,...

image

Reproduction

"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" } }

Expected behavior

The severityLevel should be represented as a string.

Relevant package, tooling and runtime versions

Serilog.Sinks.ApplicationInsights: 3.1.0

micgruber commented 2 years ago

After further investigations I saw that application insights just offers nummeric values for the severity level. So it's not a serilog issue as I initialy thought.

nblumhardt commented 2 years ago

Thanks for following up 👍