Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Sean Thorne 1 post 71 karma points c-trib
    Apr 18, 2019 @ 14:23
    Sean Thorne

    Serilog to App Insights?


    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

  • Dave de Moel 121 posts 566 karma points c-trib
    Apr 19, 2019 @ 11:43
    Dave de Moel

    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:

    And the documentation here:

  • Pankaj Nainwal 4 posts 24 karma points
    Jun 03, 2020 @ 17:54
    Pankaj Nainwal

    Hi Sean, were you able to implement this? Can you post some learnings.

  • Mario 144 posts 852 karma points MVP c-trib
    Jun 17, 2020 @ 06:53

    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 ;)

  • Gavin Williams 23 posts 133 karma points
    Nov 13, 2020 @ 13:19
    Gavin Williams

    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?

Please Sign in or register to post replies

Write your reply to: