Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    May 18, 2023 @ 13:47
    J
    0

    Application Insight logs not being recorded

    Created a standard Umbraco 10 with all updates.

    Install Microsoft.ApplicationInsights.AspNetCore.

    Under the project i right clicked > Add > Add > Applications Sights Telemetry.... accepted all defaults (connection string was found) and pressed Finish.

    Amended the Startup.cs and added

    services.AddApplicationInsightsTelemetry();
    

    In a controller i create a deliberate error which raises an exception but this is not being recorded in AI? I see frontend errors relating to missing files (deliberately deleted them) but anything to do with server side code that triggers an error isnt being recorded?

    My json is as follows for serilog (not sure if relevant)

    "Serilog": {
            "MinimumLevel": {
                "Default": "Information",
                "Override": {
                    "Microsoft": "Warning",
                    "Microsoft.Hosting.Lifetime": "Information",
                    "System": "Warning"
                }
            },
            "WriteTo": [
                {
                    "Name": "ApplicationInsights",
                    "Args": {
                        "telemetryConverter": "Serilog.Sinks.ApplicationInsights.TelemetryConverters.TraceTelemetryConverter, Serilog.Sinks.ApplicationInsights"
                    }
                }
            ]
        },
    

    In finally have ApplicationInsights which contains the ConnectionString.

    Is there something im missing to capture any controllers server side exceptions?

Please Sign in or register to post replies

Write your reply to:

Draft