In Application Insights, the client_CountryOrRegion always shows "United States" although my application is in Singapore

1.1k views Asked by At

In Application Insights, the client_CountryOrRegion always shows "United States" although everything is in Singapore (Resource Group, App Services, Application Insights). I check the App Service Inbound and Outbound IPs, everything is in Singapore

How can I config client_CountryOrRegion to Singapore or the place where my App Services is hosted? Given I am running .Net 5 application.

enter image description here

1

There are 1 answers

1
VenkateshDodda On

How can I config client_CountryOrRegion to Singapore or the place where my App Services is hosted? Given I am running .Net 5 application.

As Peter said It is the location of the client, not of the server. It is an indicator where requests come from.

By default, IP addresses are temporarily collected but not stored in Application Insights. The basic process is as follows:

When telemetry is sent to Azure, Application Insights uses the IP address to do a geolocation lookup by using GeoLite2 from MaxMind.

Application Insights uses the results of this lookup to populate the fields client_City, client_StateOrProvince, and client_CountryOrRegion. The address is then discarded, and 0.0.0.0 is written to the client_IP field.

The telemetry types are:

  • Browser telemetry: We collect the sender's IP address.
  • Server telemetry: The Application Insights module collects the client IP address. It is not collected if X-Forwarded-For is set.
  • To learn more about how IP address and geolocation data are collected in Application Insights refer to this article.

You can configure the ClientIpHeaderTelemetryInitializer to take the IP address from a different header. In some systems, for example, it is moved by a proxy, load balancer, or CDN to X-Originating-IP. Learn more.