Copied to clipboard

Flag this post as spam?

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


  • iqb-dawn 21 posts 101 karma points
    Mar 09, 2022 @ 17:38
    iqb-dawn
    0

    ApplicationInsights, MiniProfiler in Umbraco API

    We need to remove System.Diagnostics.DiagnosticSource in order to ApplicationInsights work properly (as per Microsoft) but Umbraco have this dependency.

    We are using Umbraco version 8.12.2 and we have Web API project that reference UmbracoCms.Core version 8.12.2 to get CMS data using Web Api controllers. This library references MiniProfiler and MiniProfiler is referencing System.Diagnostics.DiagnosticSource.

    As per Microsoft documentation https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-web-apps-net,

    "If any of these entries exist, remove the following packages from your application: Microsoft.ApplicationInsights, System.Diagnostics.DiagnosticSource, and Microsoft.AspNet.TelemetryCorrelation."

    So, we need to remove System.Diagnostics.DiagnosticSource in order to ApplicationInsights work properly but we can't. What can we do in this case?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 14, 2022 @ 10:44
    Jeavon Leopold
    0

    Add Microsoft.ApplicationInsights.Web NuGet to your solution instead of using the agent-based option and add your instrumentation key or connection string. https://our.umbraco.com/Documentation/Umbraco-Cloud/Set-Up/Application-Insights/index-v7

  • iqb-dawn 21 posts 101 karma points
    Mar 14, 2022 @ 10:46
    iqb-dawn
    0

    We are looking for Agent based solution as adding Microsoft.ApplicationInsights.Web break the application with assembly versions (assembly redirect issues)

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 14, 2022 @ 10:47
    Jeavon Leopold
    0

    No, it won't, I have many website running it

  • iqb-dawn 21 posts 101 karma points
    Mar 14, 2022 @ 10:49
    iqb-dawn
    0

    Belive me it breaks mine with system.diagnostics.diagnosticsource assembly and I needed to add assembly redirect. That's why we prefer to use agent based solution.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 14, 2022 @ 10:50
    Jeavon Leopold
    0

    Yup, you need those redirects, as you point out this is why you cannot use the agent option with Umbraco8

  • iqb-dawn 21 posts 101 karma points
    Mar 14, 2022 @ 10:53
    iqb-dawn
    0

    Should we assume this is as likely official umbraco response to support AppInsights and agent based solution will not work?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 14, 2022 @ 11:09
    Jeavon Leopold
    100

    See https://github.com/Azure/azure-sdk-for-net/issues/17936#issuecomment-760406470

    Using the NuGet packages is the resolution for .Net Framework.

Please Sign in or register to post replies

Write your reply to:

Draft