# 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&#x26;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 only 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&#x26;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)![](https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FJEPdp7vLeAgS0cF4IlTt%2Fimage.png?alt=media\&token=945e31b9-ed1b-4ddb-8818-7ece87d05aa6)![](https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FZJ1npucoXxNDmsK5vciL%2Fimage.png?alt=media\&token=0e900fce-c8a4-4e3f-b8ca-90e4fe544770)

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`

![](https://727226624-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjFmyReUsbJqDjHEAlW%2Fuploads%2FE9nPIPTwKU1NNnhPd9d3%2Fimage.png?alt=media\&token=1bf92bfe-46a5-41a1-a641-d43651ffdb63)

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.

{% hint style="info" %}
The events you select as part of the integration setup will be surfaced in the [**Rollout**](https://docs.runway.team/using-runway/rollout) view of each release. You can also configure [health metrics](https://docs.runway.team/using-runway/app-settings/health-metrics-settings) that define acceptable thresholds for any of these events, associate metrics with [rollout automations](https://docs.runway.team/automations/types-of-automations#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 %}

For a complete list of available metric types that Runway generates from your selected events, visit the [Metric Types documentation](https://docs.runway.team/using-runway/app-settings/health-metrics-settings#metric-types).
