Closed slanto closed 2 years ago
I'm seeing the same with the same versions of nugets, on both netcoreapp2.2 and netcoreapp3.1.
I am resolving TelemetryClient
from host service provider on startup, also tried resolving TelemetryClient
instead with no luck.
Update:
Seems we had configured ILogger
as transient dependency in order to look up the latest global logger instance via Log.Logger
, since we had to change the instance during startup when we could resolve the TelemetryClient
dependency. I'm guessing this results in asp.net disposing the logger and thus the Application Insights sink.
Hi! 👋 Thanks for getting in touch, and sorry we were unable to respond to your request. We're in the process of bringing new maintainers onto this project, and need to close stale tickets so that we can identify which items are still important to users of the sink.
If this issue still affects you:
serilog
tag will get your question in front of many more people who can help youThanks again!
I am getting this error trying to log to app insights using version 4.0.0. Was there ever a resolution to this?
Hi, I am struggling with writing logs to App Insights from ASP.NET MVC application. I get the following exception:
This is my logger configuration where I write LogEvent to Traces in Application Insights.
Because of the mentioned error, there are no any logs with Trace type in my Application Insights. Do you have any suggestions?
The following lib's version is used:
Serilog.Sinks.ApplicationInsights 3.1.0
Serilog 2.9.0