I'll try putting services.AddApplicationInsightsTelemetry(); in front of adding Umbraco.
I put it in this order because that's what the docs for Cloud say.
I do have the Serilog sink already setup. I'll get back to you after collecting some more telemetry.
Unfortunately, an exception was still logged in Umbraco but not tracked in AI:
System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Convert.ToDecimal(String value, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at SixLabors.ImageSharp.Web.Commands.Converters.IntegralNumberConverter`1.ConvertFrom(CommandParser parser, CultureInfo culture, String value, Type propertyType)
at SixLabors.ImageSharp.Web.Processors.QualityWebProcessor.Process(FormattedImage image, ILogger logger, CommandCollection commands, CommandParser parser, CultureInfo culture)
at SixLabors.ImageSharp.Web.Processors.WebProcessingExtensions.Process(FormattedImage source, ILogger logger, IReadOnlyList`1 processors, CommandCollection commands, CommandParser parser, CultureInfo culture)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext httpContext, IImageResolver sourceImageResolver, ImageContext imageContext, CommandCollection commands, Boolean retry)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext httpContext, IImageResolver sourceImageResolver, ImageContext imageContext, CommandCollection commands, Boolean retry)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 121
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
I'm experiencing the same issue. I've opened a ticket with Umbraco Support, but thought I would share what I've seen here as well if someone else can figure out the root cause. Essentially the default setup is working in v9, but not in v10+.
We're running into this issue as well. In our case, we do not want all of Umbraco logs headed to AppInsights (as the volume of logging becomes expensive so we're sending it elsewhere) but we're finding that the 500 is logged in AI, but not the actual exception that caused it.
Exceptions not recorded in Azure Application Insights
I added Azure Application Insights (AI) to my Umbraco 10 website:
I can see exceptions being logged in Umbraco using the Log Viewer, but those exceptions are not being recorded in AI.
Any idea what I should do to get them into AI?
Hi Niels,
I have added
services.AddApplicationInsightsTelemetry();
beforeservices.AddUmbraco(_env, _config)
I also set the Serilog sink via the appsettings.json
Hope this helps,
Matt
I'll try putting
services.AddApplicationInsightsTelemetry();
in front of adding Umbraco. I put it in this order because that's what the docs for Cloud say.I do have the Serilog sink already setup. I'll get back to you after collecting some more telemetry.
Unfortunately, an exception was still logged in Umbraco but not tracked in AI:
In addition to the configuration Matthew has posted you will need to install the Serilog Sink package - https://github.com/serilog-contrib/serilog-sinks-applicationinsights
And ensure you have the environment variable
APPLICATIONINSIGHTS_CONNECTION_STRING
- https://github.com/serilog-contrib/serilog-sinks-applicationinsights#configuring-with-readfromconfigurationI have this configured already, thank you!
Hello Niels, Did you find a solution to this problem - I'm having the same issue..
No, it's been a while, but I don't think so.
Hi all,
I'm experiencing the same issue. I've opened a ticket with Umbraco Support, but thought I would share what I've seen here as well if someone else can figure out the root cause. Essentially the default setup is working in v9, but not in v10+.
https://github.com/vipervf1/umb-app-insights-debug
The biggest callout is that in version 9, the logger has multiple outputs where in v10 it is just serilog.
Version 9 Injected
ILogger
Version 10 Injected
ILogger
This explains the drop off in
AppTraces
going to Application Insights, but I'm not sure if this is the cause ofAppExceptions
falling off as well.We're running into this issue as well. In our case, we do not want all of Umbraco logs headed to AppInsights (as the volume of logging becomes expensive so we're sending it elsewhere) but we're finding that the 500 is logged in AI, but not the actual exception that caused it.
is working on a reply...