How to set cloud role to see the frontend as a component in application Map in azure portal
See original GitHub issueI am using V2.0.0 of @microsoft/applicationinsights-react-js, @microsoft/applicationinsights-web in my react application and trying to set the cloud role for the web app, so that i can visualize the connections in Application map in Azure portal.
I’m trying to set cloud role in below manner `
appInsights.addTelemetryInitializer(envelope => {
envelope.tags["ai.cloud.role"] = "UI";
});
`
As per documentation (https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-map#clientbrowser-side-javascript) we need to call addTelemetryInitializer function on appInsights.Context, but in the new version it is available under appInsights not under Context.
Please let us know how to set cloud role to see the value in Azure Application Map, documentation is so confusing and outdated.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Application Map - Azure Monitor - Microsoft Learn
Application Map uses the cloud role name property to identify the components on the map. Follow this guidance to manually set or override...
Read more >Setting Cloud Role Name in Application Insights
When a cloud role name is set, it will appear as a node in the Application Map. Here is an example showing a...
Read more >Monitoring Applications using Application Insights
Exercise 1: Creating Instrumentation Key · Go to Azure Portal from here · Click on + New icon to create a new Application...
Read more >How to monitor app performance with Azure ... - YouTube
In this video, learn how to use Azure Monitor Application Insights to monitor live and historical application performance, detect/diagnose ...
Read more >VMware Horizon Cloud Service on Microsoft Azure ...
Note: The role must be assigned directly to the Horizon Cloud app registration's service principal. The use of a group-based assignment of a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is wrong in documentation. It is really an Array that is evaluated. It works for me like this:
appInsights.addTelemetryInitializer((envelope) => { if (!envelope.tags) { envelope.tags = []; } envelope.tags.push({ "ai.cloud.role": appInsights.config.appId }); });
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.