azure-application-insights

View POST request body in Application Insights

删除回忆录丶 提交于 2019-12-28 01:47:06
问题 Is it possible to view POST request body in Application Insights? I can see request details, but not the payload being posted in application insights. Do I have to track this with some coding? I am building a MVC core 1.1 Web Api. 回答1: You can simply implement your own Telemetry Initializer: For example, below an implementation that extracts the payload and adds it as a custom dimension of the request telemetry: public class RequestBodyInitializer : ITelemetryInitializer { public void

How to inject Application Insights code to monitor timing in all methods

不打扰是莪最后的温柔 提交于 2019-12-25 08:49:51
问题 I have a WCF Service where I measure timings with Application Insights SDK in this way. [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] [ServiceBehavior(IncludeExceptionDetailInFaults = true)] [BasicHttpBindingServiceMetadataExchangeEndpoint] public class DMSWebService : IDMSWebService { public static readonly string LoggingPrefix = "DMSWebService"; private TelemetryClient telemetry; //Defines if Application Insights must be enabled or not

Why is Application Insights saying I have a failed request, but successful

烈酒焚心 提交于 2019-12-25 08:15:23
问题 The request actually succeeds now, but AI says failed request. It took about 6 hours to get this working, i.e. creating the directory and putting data into the database. Not sure what AI's problem is. 回答1: the codelens indicator there does a query for requests the last 24 hours (or if not "configured" it is watching requests that went by while debugging ). if you click on it, it should have more information, and clicking the search link inside the popup will take you to a search window that

is there any limit on azure appinsights custom data trackexception error message

旧时模样 提交于 2019-12-25 07:28:42
问题 I am using azure app insights for logging in my webservice application, we are able to log the exception message and no issues in log the post method body object as well. But we are trying to log the large body object , the partiall content is truncated and shown in the azure portal. In my application side verified we are passing the serialized full object value, Code : Dictionary<string, string> requestBodyData = new Dictionary<string, string>(); requestBodyData = ex.Data.Cast<System

Can I use App Insights in a background agent?

女生的网名这么多〃 提交于 2019-12-25 03:59:50
问题 I want to add analytics to my Windows Phone 8 app and that's all fine except I now want to trace when my background agent triggers a specific event. Does App Insights support this? 回答1: I'd like to say that Application Insights does support the scenario you are describing. Recent versions of the Application Insights should support background tasks. However, you should use the "core" package, and not the full platform package. This core package provides all the APIs needed to send telemetry to

Disable default trace log messages from Web App in Application insights

家住魔仙堡 提交于 2019-12-25 03:36:28
问题 I have created a Web App in Azure and a Web API in .Net core framework following the instructions in this link. Now in my Web App , Application Insights is enabled. In WebAPI has some similar code for logging. public class Startup { public Startup() { } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(); var logger = loggerFactory.CreateLogger<ConsoleLogger>(); logger.LogInformation("Executing Configure()"); } }

Application Insights Telemetry filtering is not working

[亡魂溺海] 提交于 2019-12-25 01:55:13
问题 I have already followed the guide here. I have tried both the config and "in code" approach of initializing and registering our telemetry processor. My goal is to filter out some HTTP responses so that those don't make their way to the sampled data. I haven't had any success. While our processor is initialized on app start, the Process method is never hit. Also, I already made sure that there is an InstrumentationKey in the config and that I'm using the correct key. What else am I missing?

Can't create an alert for an App Insights custom metric on Azure

≡放荡痞女 提交于 2019-12-25 01:28:55
问题 I'm trying to create an alert for an App Insights custom metric on Azure. e.g. alert if the "My Metric" metric is greater than 40 for 5 minutes. According to Custom metrics in Azure Monitor this should be possible. After they're published to Azure Monitor, you can browse, query, and alert on custom metrics for your Azure resources and applications side by side with the standard metrics emitted by Azure. I created the metric with this code using the App Insights Python SDK (see Usage). from

work space specific variable to use in power bi query dynamically

泪湿孤枕 提交于 2019-12-25 01:12:38
问题 Use Case: We are getting app insight custom event data from app insight and publishing it in power bi using power bi queries. We have 3 environments (Dev,PreProd and Prod). We have created 3 work spaces for each environments. Question: The queries use application insight App ID which is hardcoded for now. Is there a way to pass the App ID dynamically since it will be different for different workspace/environments. 回答1: I think what you want to use is parameters. Guy in a Cube did a video

Unhandled exception not to log in appinsights

安稳与你 提交于 2019-12-24 22:49:36
问题 I have a website in asp.net aspx. I have an HTTP handler. If there is any Unhandled exception, the application_error function in HTTP handler catches it. Then it also goes to Application_Error in global.ascx. I have set up application insights.config to log all the exception in to Azure App insights. What I want is, some specific exception like maxURLsize, should not be logged in my Azure app insights. I tried below things, but its not working. 1. HttpContext.Current.Server.ClearError(); in