---
title: "Use Datadog geomaps to visualize your app data by location"
description: "Learn how geomaps can help you identify problems and guide decision-making using country codes."
author: "Mary Jac Heuman, Miranda Kapin"
date: 2021-02-23
tags: ["real user monitoring", "log management", "dashboards", "digital experience monitoring"]
blog_type_id: the-monitor
locale: en
---

Being able to track and aggregate data by region is important when monitoring your application. It can provide visibility into where errors and latency might be occurring, where security threats might be originating, and more. Now, you can use Datadog geomaps to visualize data on a color-coded world map. This helps you understand geographic patterns at a glance, including where users are experiencing outages, app revenue by country, or if a surge in requests is coming from one particular location. This provides key business and application performance insights and also helps you make informed decisions about where to focus any troubleshooting efforts.

You can use geomaps to visualize your frontend metrics from [Datadog RUM](https://www.datadoghq.com/blog/real-user-monitoring-with-datadog.md) out of the box. You can also map data from any of your log and custom metrics that contain an attribute with a value in the [standard country ISO code format](https://www.nationsonline.org/oneworld/country_code_list.htm). In this post, we’ll look at how you can use geomaps to visualize:

- RUM metrics to [monitor frontend performance globally](#monitor-worldwide-user-experience)
- application log data for [security insights](#get-key-security-insights)
- log-based custom metrics to detect business patterns and [guide development](#make-maps-to-fit-your-needs)

## Monitor worldwide user experience

Geomaps are fully integrated with Datadog [RUM](https://www.datadoghq.com/blog/real-user-monitoring-with-datadog.md), which means that you can use [RUM Analytics](https://docs.datadoghq.com/real_user_monitoring/explorer/analytics.md) to visualize frontend metrics, such as requests, latency, and errors, that impact user experience. Datadog automatically records the geographic location for all incoming RUM metrics, so you can group any RUM data by country ISO code (`@geo.country_iso_code`) to visualize it using a geomap.

The below example shows the distribution of unique user sessions (`@session_id`) generating the most `long_task` events, which happen when a task [blocks the main thread for at least 50 ms](https://docs.datadoghq.com/real_user_monitoring/browser/data_collected.md?tab=longtask) and could indicate high latency and degraded user experience.

![Geomap showing countries with highest distribution of long tasks](https://web-assets.dd-static.net/42588/1776293882-datadog-geomaps-geomap-rum.png)

Once you’ve identified the top countries with users experiencing `long_tasks`, you can dive deeper by examining the RUM events to see which services are showing slowdowns. At that point, you might consider allocating more resources to the servers handling those services in the regions experiencing issues. You can then export the map to one of your dashboards as a widget so you can monitor it, or use it to create an alert that will trigger, for example, if any users in a region experience too many `long_tasks`.

## Get key security insights

When monitoring for security threats, mapping log data can help you recognize patterns and detect unusual activity. You can add geomap widgets to your dashboards to visualize log events that have a country ISO code attribute. You can use Datadog's [GeoIP parser](https://docs.datadoghq.com/logs/processing/processors.md?tab=ui#geoip-parser) as part of a [log processing pipeline](https://docs.datadoghq.com/logs/processing/pipelines.md) to automatically parse out the appropriate country code based on a log's IP address. Then, you’ll be able to group your logs by the country ISO code and visualize the data in a geomap.

![Geomap widget showing requests by top countries](https://web-assets.dd-static.net/42588/1776293887-datadog-geomaps-geomap-security.png)

This makes it easy, for example, to track the origin of incoming requests to private endpoints. If you notice requests coming from certain origins unfamiliar to your team, it could indicate an attack on your application.

## Make maps to fit your needs 

[Generating custom metrics from your application logs](https://docs.datadoghq.com/logs/logs_to_metrics.md) lets you monitor and alert on key data that you can then visualize using a geomap for insight into geographic trends. For example, if you have an online store that logs the amount of each transaction, you could create a custom metric to track overall revenue. Using the GeoIP parser, you can extract out each transaction's ISO country code. This makes it easy to use a geomap to visualize revenue by country, and helps drive business decisions based on regional patterns.

## Visualize your data with geomaps today

Monitoring data based on geographic region is key to understanding patterns in your application's behavior and usage, whether it’s to track user experience, look for potential security threats, or guide important business decisions. Datadog's geomap visualization lets you easily parse country-specific data at a glance, so you can monitor and alert on it alongside data from more than 1,000 other technologies.

See our [documentation](https://docs.datadoghq.com/dashboards/widgets/geomap.md#pagetitle) to get started. Or, if you’re not yet signed up with Datadog, start your <!-- Sign-up trigger (free trial) omitted --> today.