Is hierarchy available in Azure Application Insights (like AWS Cloudwatch) - azure

Can we create directory in application insights? Like Aws Cloudwatch has Log Groups inside that log streams can we apply same structure in Azure Application Insights?

Looking over the docs for Cloudwatch it doesn't look like there's a direct correlation between App Insights and Cloudwatch, but you can get a similar effect.
Azure also has the concept of tagging, and that can be applied to any resource or resource group.
For the data retention settings, you can't automatically sync them between App Insights instances, but the recommended structure is to use a single App Insights instance for all the components in an application and they will be divided by cloud_RoleName property. By that architecture App Insights instance would be at least somewhat equivalent to a group and the RoleName would designate a specific stream.

Related

Custom Azure Application map like application

I have an Azure app insights resource. The telemetry data for multiple APIs and azure function gets collected in the same resource. The application map is very complex as telemetry data is collected for lot of apis in the same resource. The application map is hard to read and analyze and sometime does not load also.
What is the best way to create a custom application which will depict the Application map based on the cloud role name selected.

Find which app service an error occurred on in Azure Application Insights

I'm running a simple query in Azure Application Insights:
exceptions
| where type == "Sitecore.XConnect.Operations.FacetOperationException"
(the exact details of the exception are not relevant here, it could be any exception).
Say my site/services consist of numerous App Services and other Azure resources, is there some way to indicate in the query results which App Service the error originated from?
Your best bet is inspecting the value of the cloud_RoleName field. It is populated with resource name, for example the app service name. This works for most resources. cloud_RoleInstance can also help in identifying the azure resource.
If those fields are not populated out-of-the-box for a workload you can set them using code if needed using the AI SDK.

Application insights usage

Is there any easy way to find out which applications are using a particular application insights from azure portal?
I have checked the various options in the portals but don't find any easy to understand interface where I can find the list of applications which are sending data to that particular application insights.
The application map should provide you with a good view of various resources using the app insights resource
The application map is good. You can also go to Performance, then choose Roles. Roles is in the same tab group as Operations and Dependencies. This will give you a listing of all services that use that Application Insights instance. This has the added benefit of allowing you to expand a particular node and see the actual instances.
This same approach also works for the Failures tab. You can see the number of calls and failures rolled up per service, and also see the breakout metrics per instance.

Can ApplicationInsights track events across many WebApps/LogicApps/etc?

I have the following resources
One Mobile/API app
One MVC app
Three Logic apps
One Azure function deployment with 5 functions
I want to have a single tracking number (correlation ID) to track across all instances at the same time. I'm looking at the Contoso Insurance sample, but I'm rebuilding it by hand (not using Azure Deploy scripts).
I've read the deployment code, but I'm not sure if I can merge app insight logs together, or if it's a hack of some sort.
Observations
When I right click on visual studio, I can only associate to Application insights instances that aren't already connected to a *app (web | mobile | api).
However, in the configuration, I can give Application insights a direct GUID which might allow me to achieve the goal of one App Insights activity log for the entire process
Question
Is it possible to have one app insights log among all Mobile/API/Logic/MVC sites?
Is there a way to have (or should I have) one standard app insights instance per web app, then a special dedicated shared app insights instance for my code to call into and log?
What is contoso insurance doing with Azure App Insights?
Jeff from Logic Apps team here -- So the answer is yes - but there are some caveats. We are working to make the experience seamless and automatic, but for now it will require the following. First as a heads up:
First, for Logic Apps we have what's called the client tracking ID -- this is a header you can set on an incoming HTTP Request or Service Bus message to track and correlate events across actions. It will be sent to all steps (functions, connectors, etc.) with the x-ms-client-tracking-id header.
Logic Apps emits all logs to Azure Monitor - which unfortunately today only has a sink into Event Hubs, Storage, and Log Analytics -- not App Insights.
With all of that in-mind, here's the architecture we see many following:
Have your web apps just emit to App Insights directly. Use some correlation ID as needed. When firing any Logic Apps, pass in the x-ms-client-tracking-id header so you can correlate events.
Log your events to App Insights in the Function app. This blog details some of how to do that, and it is also being worked on for a better experience soon.
In your logic app - either write a Function to consume events off of Azure monitor and push to App Insights, or write a function that is an App Insight "logger" that you can call in your workflow to also get the data into App Insights.
This is how Contoso Insurance is leveraging App Insights as far as I understand. We are working across all teams (App Insights, Azure Monitor, Azure Functions, Logic Apps) to make this super-simple and integrated in the coming weeks/months, but for now achievable with above. Feel free to reach out for any ?s

How to Scale Azure cloud service up and down from Rest API with WebAPI

I am creating a demo where I need to be able to scale up my cloud service deployment from a WebAPI.
I went over the rest API documentation and didn't seem to find what I need.
Is it possible to use Service Management API to scale a cloud service up and down ?
Alternative I will just enable auto scale on a queue and then post messages to the queue to get it to scale up :)
As such there's no such function in Service Management REST API for scaling. Since the number of instances for a particular role is stored in the service configuration file, what you would need to do is read this configuration information using Get Deployment operation, locate the Instances node and change the value of count attribute. Then you would need to call Change Deployment Configuration for new instance count to be effective.

Resources