azure-application-insights

Telemetry sampling without affecting the errors/failures

廉价感情. 提交于 2019-12-06 02:59:34
I want to log a percentage of the success calls in app insights. I came across this post https://docs.microsoft.com/en-us/azure/azure-monitor/app/sampling and I think Fixed-rate sampling is appropriate here. But does this affect all logging equally? Will some errors/failures no longer be logged? I am looking for a solution that logs a percentage of the success calls, but keeps all failed requests/errors. I don't think this is supported out of the box, but you can write your own ITelemetryProcessor . See: https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#filtering

Fetching data from Application insights (Azure Portal) to display it on a web page in asp.net web application

依然范特西╮ 提交于 2019-12-06 00:24:04
I have configured my .net web application with azure portal using application insights. Now what I want is that the details that are shown in the portal should be displayed on my web page of my .net web app. I don't know hoe to do it and want someone to help me in this regard. T am also sharing the snapshot of what actually I want to fetch from my azure portal, to display as a grid report on my application's web page. [ There's an API for retrieving data from Application Insights. From the documentation you can "Query and integrate with the performance, availability and usage data collected by

Adding correlation id to automatically generated telemetry with App Insights

安稳与你 提交于 2019-12-05 22:51:08
I'm very new to Application Insights, and I'm thinking of using it for a set of services I plan on implementing with asp.net webapi. I was able to get the basic telemetry up and running very easily (right-clicking on a project on VS, Add Application Insights), but then I hit a block. I plan to have a correlation id set in the request headers for calls to downstream services, and I would like to tag all the telemetry related to one outside call with the same correlation id. So far I've found that there is a way to configure a TelemetryInitializer , but if I understood correctly, this is run

Exception running application when adding insights to application using Application Insights Status Monitor Preview

孤街醉人 提交于 2019-12-05 18:49:32
I'm playing around with the preview, and tried adding insights to a IIS web application deployed locally on my machine. It's a .Net 4.5 application running in a nothing out of the ordinary application pool. When starting the application after adding insights, I get this exception: Could not load file or assembly 'Microsoft.ApplicationInsights.Extensions.Intercept_x64.dll' or one of its dependencies. The module was expected to contain an assembly manifest. I tried "Enable 32-Bit Applications" to both true and false with no difference in result. Has anyone experienced a similar error?

WebTelemetryInitializerBase in ASP.NET Core / MVC6

烈酒焚心 提交于 2019-12-05 11:54:18
Is there an MVC6 compatible version of WebTelemetryInitializerBase that would work with ASP.NET Core (on the full .NET Framework)? See my question here where I asked how to get HttpContext in my temeletry initializers. Unfortunately I didn't specify that I was using MVC 6 and thus no System.Web.HttpContext . Yes, there is a version of this for aspnetcore. Check out the Microsoft Application Insights for ASP.NET Core applications repo. There is an implementation of getting the WebUser found in /src/Microsoft.ApplicationInsights.AspNetCore/TelemetryInitializers/WebUserTelemetryInitializer.cs

AreaRegistration.RegisterAllAreas() never finishes when using Application Insights

≯℡__Kan透↙ 提交于 2019-12-05 11:14:34
I created a new ASP.net MVC application using Visual Studio 2013 Update 4 and checked the box to use Application Insights. When I try and run the application (with or without debugging) the site never loads. When I debug it I noticed that it is getting stuck in Global.asax.cs on the line: AreaRegistration.RegisterAllAreas(); I have taken a look at the answers on a few other questions including this one: AreaRegistration.RegisterAllAreas() is not Registering Rules For Area This did not solve my issue. I have deleted all of the content in the folders in this answer and restarted visual studio,

Application Insights to azure webjob .Net Core 2.0

只谈情不闲聊 提交于 2019-12-05 10:27:58
How to add application insights telemetry (Application Insights) to azure webjob ? With recently released WebJob SDK 3.0, you can add ApplicationInsights in the ConfigureLogging method public static async Task Main(string[] args) { var builder = new HostBuilder() .ConfigureWebJobs(b => { b.AddAzureStorageCoreServices().AddAzureStorage(); }) .ConfigureAppConfiguration(b => { // Adding command line as a configuration source b.AddCommandLine(args); }) .ConfigureLogging((context, b) => { b.SetMinimumLevel(LogLevel.Debug); b.AddConsole(); // If this key exists in any config, use it to enable App

Detecting whether or not (and why) Application Insights can send telemetry data to Azure

一笑奈何 提交于 2019-12-05 06:30:42
问题 I'm developing a Windows Desktop application and have successfully linked the Application Insights Core assemblies. I'm using TrackTrace , TrackEvent , etc. to send custom telemetry. On some workstations telemetry is successfully sent to the Azure portal, and on some others it is not, although calls to TrackTrace , Flush , etc. succeed (or at least return without throwing an exception. TelemetryClient.IsEnabled() returns true. Both workstations use an InMemoryChannel , with the same endpoint

Application Insights - Logging exceptions

旧街凉风 提交于 2019-12-05 05:32:21
I wrote a custom logger for Application Insights in my app. I don't see any exceptions or ANY events when viewing App Insights in Azure Portal. Here is the logger class code, when I debug the code I do see a key assigned to the InstrumentationKey property, any ideas what I am doing wrong here? Do I need to attach other info to the client or configuration? public class AppInsightsLogger:ILogger { private TelemetryClient ai; public AppInsightsLogger() { ai = new TelemetryClient(); if (string.IsNullOrEmpty(ai.InstrumentationKey)) { // attempt to load instrumentation key from app settings var

ASP.NET Core MVC application insights stopped working after upgrade to .NET Core 1.1.1

我只是一个虾纸丫 提交于 2019-12-05 03:19:16
I have one simple ASP.NET Core application I was working on back in December 2016. It worked just fine with application insights and telemetry. Now after 4 months I wanted to pick up this work and started with upgrade from .NET Core 1.1.0 to 1.1.1. In this process package Microsoft.ApplicationInsights.AspNetCore got updated from version 1.0.2 to version 2.0.0 . This unfortunately caused my app to stop working, in particular I get this error: An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify