问题
Is it possible to funnel traffic from Application Insights (the javascript-driven browser telemetry) through a custom domain for adblock purposes? We'd like our telemetry to be allowed/blocked based on our own domains rather than Microsoft's domains.
Ultimately, this is for business software and we're having some difficulties that AI is meant to help us support our customers with but because so many of our customers have adblock software in place, it's becoming increasingly difficult to support them as we have to ask them to disable (who knows what) software and then try to hit the error again so we can understand what's going on. If we could instead just have the Application Insights javascript client send everything through a custom domain, we think we could bypass this support issue while still being nice enough to let people who really care to block such telemetry via our own domain.
回答1:
Can you? Sure, but you'd have to do the work yourself, i don't know that anyone's invented a proxying type service like that yet.
write a service that takes the data that AI sdks send, and forwards it to the real services
configure your application insights code to send data to your service created in step 1 instead of the real service.
the sdks do allow you to change the endpoint that it sends telemetry to, so it is possible.
I believe other people have asked a similar question for sending telemetry from machines that don't have any external network access, or limited access (like on an intranet app). you'd have them send data to such a service instead, and it would be able to send that telemetry.
回答2:
Are you saying adblocks block traffic to dc.services.visualstudio.com ? That is the only domain which SDK's send their data to, so it should be easy enough to ask customers to unblock when they unblock your domains.
来源:https://stackoverflow.com/questions/41982437/can-i-funnel-application-insight-browser-telemetry-through-a-custom-domain