I am running Visual Studio 2022 (17.0.2), and I just created a new Web API Core project from the template. I enabled Microsoft Identity as the identity provider (Azure AD).
Then I ran the solution and it brings up swagger. I did a "Try It Out" on the WeatherForecast operation. (Which failed with a 401 because the template does not enable swagger's security abilities.)
But the odd part is that in my Chrome DevTools, after the 401 line, I got this:
Why is my new project (from the standard Web API Core template) making calls to an external site? I don't have anything in my code referencing https://dc.services.visualstudio.com/v2/track
. There are strict privacy laws around the code I write, and I get very nervous when there are suddenly random calls to unknown URLs.
I did some googling, and it seems this is related to something called "Microsoft Telemetry" or "Application Insights". But all the fixes that I can find have you removing or disabling code that does not come in the default WebAPI template. Like this answer.
I did see a fix that had you modify the hosts files so that the traffic would not leave your machine. That seems like it would work, but then I have to get this change done to my production machines (which I would rather not).
Why is this in there by default?
And more importantly how can I remove it so that it is not in my code when it is deployed to production?