-
Notifications
You must be signed in to change notification settings - Fork 112
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
Application Insights not tracking fetch calls #214
Comments
Thanks for reporting this. Will take a look at this. |
In order to solve the issue I ended up using Application Insights for React https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript-react-plugin |
@vasalis - very good idea. I personally use the React plugin for many projects, based on yo teams. |
Describe the bug
Enabling application insights does not track fetch requests, even by enabling them on App Insights configuration.
To Reproduce
Steps to reproduce the behavior:
Create a new Teams app with Application Insights enabled. For example a Tab using personal scope.
Change JavaScript snippet to enable tracking of fetch requests, like this:
{ instrumentationKey: "{{APPINSIGHTS_INSTRUMENTATIONKEY}}", disableFetchTracking: false, enableCorsCorrelation: true, distributedTracingMode: 2, });
Create a fetch request, for example:
useEffect(() => { fetch("https://backend", { method: "GET", headers: { Accept: "application/json", "Content-Type": "application/json" } }) .then(response => response.json()) }, []);
The request is not tracked on Application insights.
Expected behavior
The request should be logged on Application Insights as a dependency.
Detailed information
3.0.3
)yoteams-build-core
): [eg: 1.0.0]Additional information
Also, when enabling Application Insights on the generator, I would expect to enable tracking of fetch requests and distributed tracing by default. Moreover, upgrading to the latest version of Application Insights did not solve the issue.
The text was updated successfully, but these errors were encountered: