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

Question: Is it possible to include data without it rendering in the trace message? #174

Closed lucashby closed 2 years ago

lucashby commented 3 years ago

Is there a way to include additional data so that it shows up in 'customDimensions' without being rendered in the message itself? Is that something I would need to achieve myself, and if so, how would I go about doing that?

nblumhardt commented 2 years ago

Enrich.FromLogContext() and LogContext.PushProperty() should achieve this. HTH!