Locate users by geographic region
Grafana Cloud

Locate users by geographic region

Frontend applications often serve a globally distributed user base, meaning that your users can be spread across multiple geographical regions and access your application from diverse locations. In some instances, a user’s location can affect the performance of web applications.

Frontend observability can help you determine the approximate location of your users and understand if your application experiences a performance degradation due to user location in relation to the location of the frontend. It also can help you visualize demographic information, such as the region that appears most prominent across a user base.

These insights can give you visibility to properly allocate resources according to location, as well as provide metrics to determine if your application is achieving goals based on geography.

Geolocation enhances all signals with geo-attributes used from a reverse lookup of the session IP. These attributes include GeoLite2 data provided by MaxMind.

Note

If you allow the collection of geolocation of your end users, you assume the responsibility for disclosure and privacy to your customers. When you enable this feature, you confirm that you have complied with applicable laws, such as ePrivacy, GDPR, and CCPA, to process the location of your end users. This includes obtaining consent where required. Learn more about geolocation privacy in Frontend Observability.

Before you begin

  • Ensure you have permission to create and edit an application in Frontend Observability

Enable geolocation

Complete the following steps to enable geolocation within a selected application in Frontend Observability:

  1. Use the left navigation to select Frontend and then choose the desired application.
  2. Click the Settings tab and then click Geolocation.
  3. Select Enable geolocation.
  4. Under Geolocation specificity, select the level of specificity your geolocation metadata should display from Continent to Network. More specificity means more detail about where users are located. If you change this setting, it may take a few moments before the Location filter updates.
  5. Optionally, under Country denylist, select countries that you want to exclude from geolocation.

Filter metadata by geographic region

After you enable geolocation in your application settings, navigate to any view in Frontend Observability and use the Location filter to filter by geographic location.

For example, filter by Country and then narrow the scope of the table to only show rows where user sessions where initiated in Germany.

The levels are additive, meaning that as you narrow the selection, geolocation includes the previous one as well. For example, City also tracks Continent.

To filter metadata by geographic region

  1. Use the left navigation to select Frontend and then choose the desired application.
  2. Use the Location filter to select geographic locations.