Azure function application insight configuration - azure

I would like to customize the application insight configuration for an azure function by creating telemetry initializer. My current scope of work is to identify a way to correlate messages sent from an HTTP triggered azure function to another HTTP triggered azure function and for that was trying to follow the help at dzimchuk.net. However I do not see an ApplicationInsights.config in my azure function project. I found the GitHub project that includes an app insight configuration file, and hence not sure how that project was created. Any help would be much appreciated.

Functions v2 has the capability to do this, but it isn't directly supported.
Warning
Do not add AddApplicationInsightsTelemetry() to the services collection as it registers services that conflict with services provided by the environment.
Do not register your own TelemetryConfiguration or TelemetryClient if you are using the built-in Application Insights functionality.
Closest I've gotten is this comment on a github issue which tries to preserve the existing functionality.
There are a few others I've seen around but many of them break integrations with Azure Portal such as the Quick Pulse (Live metrics feed) and performance metrics.

Related

Custom connector not found in Azure logic app(Standard)

I added a logic app custom connector resource to connect to on premise HTTP API. But I'm not able to find it in logic app actions,
I tried creating consumption logic app and it showed up there.
Not getting in standard logic app for some reason. I tried searching with different keywords like custom connector and name of connectors. No results. Also tried to include this action from code view . It got added, but the logic app stops after executing trigger only.
Both my connector and logic app are in same region as per documentation. Can someone let me know why it is not showing up in standard logic app actions?
Currently we don’t support invoking the customer connector from Logic App standard. This is something product team are planning to support but no ETA yet.
Custom managed connectors currently aren't currently supported.
As Mayank mentioned, custom connectors are not yet supported for Logic app standard version. Couple of possible workaround solutions are:
1.Try built-in connector extensibility - https://techcommunity.microsoft.com/t5/integrations-on-azure/azure-logic-apps-running-anywhere-built-in-connector/ba-p/1921272
2.Use a consumption logic app for integrating custom connectors and invoke it from your standard logic app.
Custom connector support is coming soon to Logic Apps Standard.
By creating a new custom connector and manually adding it to the connection json and manually crafting the workflow code view you can make this work today. Once you do this some of the UI will work, full support coming soon.

Application Insights Behaviour with Azure Functions and WebAPI

This question is more on the logging to AI from Azure Functions and from the WebAPI. In WebAPI we need to provide the Instrumentation Key while initializing the Logger from the Startup.cs. But in functions, it's been taken Automatically and the logs are getting logged on to the AIs automatically. Why is the difference in behavior for logging data from different kind of applications on to the AI in Azure. I was trying to figure out the same and most of the people gave an answer which says the function contains the inbuilt logger and it is more of a serverless. I am not getting satisfied with this answer as WebAPI also runs in the context of the AppServices in Azure. It will be helpful if some one can throw some light on this issue.
Regards,
Ram
The answer "the function contains the inbuilt logger and it is more of a serverless." is actually the answer.
The azure function has an extension Microsoft.Azure.WebJobs.Logging.ApplicationInsights running background which is used to read Instrumentation key and write logs to Application insights. So you just provide an Instrumentation key for function is ok. You can also find more via the source code.
But web api does not have such built-in extensions, we need to configure AI by ourselves.

Enabling App Insights profiler in Azure functions

Is it possible to use the application insights profiler on azure functions? Either via the portal or a more manual means.
I haven't found a way in the portal and I haven't seen explicit documentation stating either way nor github tickets.
I'd assume probably not, as many of the automagic features of application insights don't seem to be supported yet.
If it's not possible, out of interest is it because of the azure functions sandbox not giving enough permissions for profiling?
If it's not possible, out of interest is it because of the azure functions sandbox not giving enough permissions for profiling?
The application insights profiler is just supported in web app. The Azure function belongs to function app. So you can not use profiler in Azure function.
Profiler currently works for ASP.NET and ASP.NET Core web apps that are running on Web Apps.
If you want to suggest Microsoft to add some new features like app insights profiler in app insights in azure function, you could put your suggestion in Github.
Next steps
Application Insights is now GA’d and ready for production workloads. We’re also listening for any feedback you have. Please file it on our GitHub. We’ll be adding some new features like better sampling controls and automatic dependency tracking soon.

Monitoring the Azure app services

I was wondering if someone can shed some lights on the application monitoring and alerting solution that's being used to specifically monitor the Azure app service. We have multiple API apps running on App service service and we would like to monitor certain metrics (ex: Availability, response time, number of request received, etc). I enabled the application insight on each of these apps and the result is quite promising, it fulfills all my requirement, but there's one small issue: I need to scroll through each app to see their performance. I can't aggregate them all in one space. I would like to create a centralized dashboard for all aforementioned metrics and have them displayed. I tried using OMS but it seems to be lacking a lot of functionality.
Any pointer would be very appreciated.
I wrote recently about it on our blog: http://predica.pl/blog/azure-monitoring-and-auditing/ - you will find link to MS documentation also there.
If you are using App Insights already you should be able to pick things from App Insights and put it on the Azure portal dashboard. Other than that probably getting data into Power Bi application insight is your best shot - https://powerbi.microsoft.com/en-us/documentation/powerbi-content-pack-application-insights/

How to do network tracing in Azure Function?

I am having a problem with a third-party library. It worked last week but this week is failing. I wish to turn on the network tracing as I would normally configure in web.config such as is described for an Azure App Services job here:
https://blogs.msdn.microsoft.com/waws/2017/03/14/how-to-get-a-system-net-trace-of-your-c-web-job/
Is this in any way possible with Azure Functions, or is there an alternative?
Unfortunately this isn't possible with consumption plan as we don't allow you to modify the web.config.
If you can set up an app service plan for testing, you can deploy the functions runtime as a private site extension with your web.config changes, see here: https://github.com/Azure/azure-webjobs-sdk-script/wiki#deployment
A related option to help you with diagnostics/analytics is the preview app insights support: https://github.com/Azure/Azure-Functions/wiki/App-Insights-Early-Preview

Resources