Hi,
today I ran into an odd behavior that on app shutdown of my ASP.NET Core service, one part of the application (the Serilog Sink) tries to Flush before it disposes.
But at that point in time, this.configuration.TelemetryChannel in TelemetryClient is already null.
And that causes Flush to throw a hard NullReference Exception Code line 589
see serilog-contrib/serilog-sinks-applicationinsights#46
Could you just elvis the expression or at least null check it?
Thanks,
Michael