> For the complete documentation index, see [llms.txt](https://docs.runway.team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.runway.team/integrations/observability-and-analytics/datadog.md).

# Datadog

<div align="left"><figure><img src="https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FFBciZ06NJgzBXRUlghjN%2Fdatadog.png?alt=media&amp;token=f335798f-c9a1-4aee-8d2c-6ae520a64194" alt=""><figcaption></figcaption></figure></div>

## Set up

### Navigate to the Integration settings view

1. Select an app in the top left corner from the Switcher
2. Navigate to **App Settings** by clicking the gear icon (⚙️) at the top of the Timeline sidebar
3. Click on **Integrations** in the sidebar

### **Connect Datadog**

1. Find the **Datadog** integration module under the **Observability & analytics** section
2. Click the **Connect** button
3. Enter your **API Key** and **Application Key Secrets.** You can find your API Key and Application Key Secrets by visiting **Organization Settings > Access** in Datadog. :link:[Datadog documentation: API and Application Keys](https://docs.datadoghq.com/account_management/api-app-keys/)

{% hint style="info" %}
It isn't strictly necessary to specify scopes when creating an Application Key, as it will inherit the scopes of the user or service account that is creating it.
{% endhint %}

### Configure the Datadog integration

1. Select the desired Datadog **Application** from the drop down list
2. Select **custom action type events** from your Datadog project to monitor from Runway. Additionally, you can specify event metrics to track metrics such as averages, medians, and percentiles.

Runway's Observability & Analytics integration with Datadog currently supports Custom metrics and RUM events:&#x20;

* Configuring Custom metrics:&#x20;
  \*

  ```
  <figure><img src="/files/b54jeijvhtm86cjT48RZ" alt="" width="375"><figcaption></figcaption></figure>
  ```

  * Custom metrics list: metric name + aggregation (Sum, etc.), multiple rows via "Add custom metric".
  * Fetch one version per request: for Datadog rejecting/truncating large version queries (same as Stab mon, can leave unchecked unless data is missing)
  * Additional metric tag filters (these are global for the integration, can leave unset)
  * Skip filtering custom metrics by service: when custom metrics don't expose a `service` tag; note the guidance to add an app-specific tag filter if the metric name is shared across apps.
  * Use custom Datadog service value: when Datadog service values don't match the App Store bundle ID.
* Configuring RUM:&#x20;
  \*

  ```
  <figure><img src="/files/LzJlARsOBzhSAW9kex0O" alt="" width="375"><figcaption></figcaption></figure>
  ```

  * Runway supports RUM events of the **Action event type** with **custom** action types. Event metrics must be added as *measures* before they can be configured in Runway. You can read about adding facets/measures from custom attributes in Datadog's documentation [here](https://docs.datadoghq.com/real_user_monitoring/guide/send-rum-custom-actions/?tab=npm#create-facets-and-measures-on-attributes). Once you've added your custom attribute as a facet, it can be configured as an event metric in Runway using the facet's *path*. Note that the leading `@` is not required.
  * See below for an example Event name + Metric name pair that monitors the custom `edit_item` event for a bill-splitting app, and the associated `amount` metric:
    * Event name: `edit_item`

      * This is the **action name** of the custom Action event

      <figure><img src="https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FzRA5vzhxwfJm8tEX0fHt%2Fimage.png?alt=media&amp;token=eb960584-fd90-47ef-a31f-942ef6a834f5" alt=""><figcaption></figcaption></figure>

      * Metric name: `context.amount`
        * This is the `amount` measure that's been configured from the `amount` custom attribute
* ![](https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FVOH7W4QaT5rHRsFCgff2%2Fimage.png?alt=media\&token=a35327f0-fcb6-40a5-b2c1-66ae998336a6)<img src="https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FZJ1npucoXxNDmsK5vciL%2Fimage.png?alt=media&amp;token=0e900fce-c8a4-4e3f-b8ca-90e4fe544770" alt="" data-size="original">

  <figure><img src="https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FJEPdp7vLeAgS0cF4IlTt%2Fimage.png?alt=media&amp;token=945e31b9-ed1b-4ddb-8818-7ece87d05aa6" alt=""><figcaption></figcaption></figure>

  * You can view a full list of available custom actions by going to UX Monitoring > Sessions & Replays and filtering for Actions where `@action.type:custom`
  *

  ```
  <figure><img src="/files/bqpshZfJuRQftwSOaZIh" alt=""><figcaption></figcaption></figure>
  ```

  * Additional event types (e.g. `Views`, `Sessions`, and `Resources`) are not currently supported. Out-of-the-box action types (like `application_start`) are also not supported.
  * For a complete list of available metric types that Runway generates from your selected events, visit the [Metric Types documentation](/using-runway/app-settings/health-metrics-settings.md#metric-types).

{% hint style="info" %}
The events you select as part of the integration setup will be surfaced in the [**Rollout**](/using-runway/rollout.md) view of each release. You can also configure [health metrics](/using-runway/app-settings/health-metrics-settings.md) that define acceptable thresholds for any of these events, associate metrics with [rollout automations](/automations/types-of-automations.md#halt-unstable-phased-releases) and more!
{% endhint %}

{% hint style="info" %}
When selected events include an associated metric, Runway will compute additional metrics automatically, such as Average value, Median value, and percentile metrics. For more information on Datadog metrics including default metrics collected, visit their [documentation](https://docs.datadoghq.com/real_user_monitoring/browser/data_collected/).
{% endhint %}
