azure-application-insights

Remove trace from application insight

拜拜、爱过 提交于 2019-12-23 10:25:09
问题 I have deployed my project in Azure & using Application Insights. After deployment, I have done some test that why some traces wrote in respective Application Insights. But, I just want a fresh (without any trace) Application Insights without creating a new Application Insights resource. Is it possible to remove the previous traces from Application Insights? how? *Application Insights- system monitor & trace/log viewer at Azure. 回答1: It's impossible to delete any data. It ll auto-clear after

What is the best practice to log request body on failed requests in Application Insights?

六月ゝ 毕业季﹏ 提交于 2019-12-23 09:58:49
问题 What is the best way to log the HTTP request body when a request fails? I'm logging unhandled exceptions by overriding the Exception logger: public class AiExceptionLogger : ExceptionLogger { public override void Log(ExceptionLoggerContext context) { if (context != null && context.Exception != null) { ExceptionTelemetry telemetry = new ExceptionTelemetry(context.Exception); // the requestBody is always empty because the stream is non-rewinadable? string requestBody = context.Request.Content

How to track MongoDB requests from a console application

99封情书 提交于 2019-12-23 07:47:51
问题 I have a Console Application project written in C# which I've added Application Insights to with the following NuGet packages. Microsoft.ApplicationInsights Microsoft.ApplicationInsights.Agent.Intercept Microsoft.ApplicationInsights.DependencyCollector Microsoft.ApplicationInsights.NLogTarget Microsoft.ApplicationInsights.PerfCounterCollector Microsoft.ApplicationInsights.Web Microsoft.ApplicationInsights.WindowsServer Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel I've

TelemetryClient does not send any data unless Flush is called

爱⌒轻易说出口 提交于 2019-12-23 07:36:43
问题 I'm using TelemetryClient (v0.17.0.576) directly in my code and it looks like I can push data to Azure only when I manually call Flush at the end which feels wrong. Am I missing something here ? var configuration = TelemetryConfiguration.CreateDefault(); configuration.InstrumentationKey = "KEY"; var client = new TelemetryClient(configuration); for (int i = 0; i < 10; i++) { log.Information("Loop: {0} {1}", i, value); client.Track(new TraceTelemetry(value)); } client.Flush(); 回答1: For

Application Insights with AWS Elastic Beanstalk

谁都会走 提交于 2019-12-23 05:34:05
问题 I'm trying to get Application Insights running on an application on hosted on multiple instances in an AWS Elastic Beanstalk. The problem is that the servers are all seen as a single server. I think this is because they all have the same HostName. Does anyone know how I can: Set the ServerName property in Application Insights manually on startup? or Force AWS to give each instance a different HostName? 回答1: You can change set the value with Telemetry Initializer if the field is public,

Adding Custom Dimension to Request Telemetry - Azure functions

孤者浪人 提交于 2019-12-23 02:46:31
问题 I am creating a new Function app using v2.x and I am integrating Application Insights for request logging that is automatically being done as Azure Function is now integrated with App Insights (as mentioned in the documentation link). What I would need to do is log few custom fields in the custom dimensions in Application Insights Request Telemetry. Is it possible without using Custom Request logging (using TrackRequest method) 回答1: About adding custom properties, you could refer to this

Custom Application Insight TelemetryInitializer using Azure Function v2

徘徊边缘 提交于 2019-12-22 18:27:33
问题 In a Azure Function we make a number of request using the .NET HttpClient class, the Azure Servicebus SDK and the Azure Storage SDK - everything is beautifully logged via the build in Application Insight logging, showing dependencies and all! Now we however like to add an implementation of ITelemetryInitializer to add a few dimensions to the EventTelemetry being written by the SDKs mentioned above. We start by creating a class implementing the ITelemetryInitializer interface. public class

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

眉间皱痕 提交于 2019-12-22 11:06:05
问题 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. [ 回答1: There's an API for retrieving data from Application Insights. From

Intercept Azure Function Host Shutdown: Flush Application Insights TelemetryClient

前提是你 提交于 2019-12-22 08:52:12
问题 I am playing a little bit with Azure Function: Mostly I try to migrate an existing webjob to Azure Functions and now it is time for me to integrate Application Insights in one of my function. So basically I only need one instance of the TelemetryClient but this assumes that I am able to flush the in-memory buffer when the application stops. I've used a TimerTrigger but it was just for testing purpose. I've referenced the Microsoft.ApplicationInsights nuget package (from this SO post) and my

Application Insights added ConnectedService.json file to my project, what does this do?

谁说我不能喝 提交于 2019-12-22 02:22:21
问题 I have added application insights to my asp.net 4.6 web application. This also added the file Service References\Application Insights\ConnectedService.json The contents of this file: { "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider", "Version": "7.1.719.1", "GettingStartedDocument": { "Uri": "https://go.microsoft.com/fwlink/?LinkID=613413" } } What is this file for? It does not seem to provide any logic to my application and does not seem to be required