Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Fairly new to Umbraco and am using version 8, can anyone help me / push me in the right direction on how to configure Application Insights to work with Umbraco's internal Logging.
I'd like to be able to see all Logs that created pushed through to app insights
To push Umbraco log messages from serilog to App Insights you need to use the correct "sink".
You can find the package for the sink here: https://www.nuget.org/packages/Serilog.Sinks.ApplicationInsights/
And the documentation here: https://github.com/serilog/serilog-sinks-applicationinsights
Hi Sean, were you able to implement this? Can you post some learnings.
You need to install the nuget that Dave said. Then you have to configure it in the '~/config/serilog.user.config' as:
<add key="serilog:using:ApplicationInsights" value="Serilog.Sinks.ApplicationInsights"/>
<add key="serilog:write-to:ApplicationInsights.telemetryConverter" value="Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters.TraceTelemetryConverter, Serilog.Sinks.ApplicationInsights"/>
<add key="serilog:minimum-level:override:Microsoft" value="Warning" />
Check the configuration of the package and try to 'translate' it to the XML configuration if you need something else, but that should give you a start ;)
I added the settings to my serilog.user.config and now get the following error:
Invalid cast from 'System.String' to 'Serilog.Sinks.ApplicationInsights.TelemetryConverters.ITelemetryConverter'.
.. Any assistance would be appreciated.
I got this error after upgrading a working version of Serilog.Sinks.ApplicationInsights to v4.0.0 - rolling back to 3.1.0 fixed the issue.
Hi Sean. Were you able to get this to work? For example, how did you configure the instrumentation key and/or connection string so it knows which appinsights instance to write to?
In case anyone else stumbles over this from Google: I added application insights to an existing Umbraco 8.18 installation, and a combination of solutions worked:
Using the manual installation guide here (automatic didnt work):
Then Mario Lopez' solution with serilog in the config, and lastly Keith Lawrence with serilog sink version tip (saved me a couple of hours!).
Shout out to this guy as well:
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted