-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] The latest version 2.4.4 cannot connect front-end with back-end on the Application Map on Application Insights #1207
Comments
I had a similar issue in React. I figured out that
is the problem. Using
works great for me. I'm on "@microsoft/applicationinsights-web": "^2.4.4",. |
Thank you @MariuszKogut I suspect that the root cause is that the operation_Parent_Id of request entry does not match the id of its previous dependency entry. |
Makes sense to me, @ZhimaoLin. I would also prefer W3C over AI, because it's a good choice to rely on standards. Hopefully Microsoft will fix this issue... |
This is also affecting our team. We spent a lot of time debugging because the applicationinsights-web documentation recommends using |
Yes my team and I have also been having problems with this and we would rather not update later when |
The above #1213 is included in the next version 2.5.1 which has already been released to NPM and is scheduled to be released to the main CDN channel tomorrow. |
Thank you. |
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. |
Description/Screenshot
On the Application Map, the front-end and the back-end are not connected when I use
@microsoft/applicationinsights-web@2.4.4
on the Angular front-end. However, it works as expected when I use@microsoft/applicationinsights-web@2.1.0
on the Angular front-end.Environment
I have 3 components: AngularFrontend, Backend1, and Backend2.
The AngularFrontend calls Backend1, and then Backend1 calls Backend2. The calls are via HTTPS.
Application Insights Setup
AngularFrontend
I use
npm i --save @microsoft/applicationinsights-web
, which installs the latest version of@microsoft/applicationinsights-web
(2.4.4). Then, I followed the NPM Setup in this documentation: https://github.com/microsoft/ApplicationInsights-JS#npm-setup-ignore-if-using-snippet-setup. After that, I set cloud role name by following https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-map#clientbrowser-side-javascript.Backend1 and Backend2
I setup Application Insights on my .Net Core WebApi using https://docs.microsoft.com/en-ca/azure/azure-monitor/learn/dotnetcore-quick-start#configure-app-insights-sdk. The SDK
Microsoft.ApplicationInsights.AspNetCore
version is 2.12.0. Since the SDK enables distributed tracing by default, I only configure Cors and TelemetryInitializer.Problem
On the Application Map, the AngularFrontend node is not connected to the Backend1 node.
Steps to Reproduce
Try to create an example project where an Angular 9 front-end calls a .Net Core 3.1 WebApi via HTTPS. Both of them send telemetry to one Application Insights. Then, check the Application map on the Application Insights, it should be observed that the front-end node is not connected to the back-end.
Expected behavior
The front-end and the back-end should be connected on the Application Map
Additional context
I am having the same problem with #894. I noticed that it says the problem is solved by turning on the cors correlation option in July 2019. So, I tried version 2.1.0 that was released on July 5, 2019, and it worked as expected.
The text was updated successfully, but these errors were encountered: