# DX & Better Stack integration

Send your Better Stack incidents to DX, so they count toward its MTTR, change failure rate and incident reports.

## Connect DX and Better Stack

1.  Go to **Integrations** → [Exporting data](https://incidents.betterstack.com/team/0/integrations/exporting-data ";_blank") and find the **DX** card under **Reporting**.
2.  Click **Add**.
3.  Name your integration so you can recognize it later.

### Get the host URL and API token from DX

In DX:

1.  Go to **Data Cloud → API keys**.
2.  Copy the host URL shown there, for example `https://acme.getdx.net`.
3.  Create a key and copy it.

### Finish in Better Stack

1.  Paste the host URL into **Instance URL**.
2.  Paste the key into **API token**.
3.  Click **Create DX integration**.

Better Stack checks the connection as you save. From now on, every incident of the team is sent to DX and kept up to date as it is acknowledged, resolved or reopened. Incidents resolved before you connected are not sent.

## Count incidents toward change failure rate

DX works out change failure rate per service, so an incident counts only when it names the service your deployments send to DX.

- To use one service for the whole team, enter it in **Service identifier** as you create the integration.
- To use a different service for one monitor, heartbeat or integration, add [metadata](https://betterstack.com/docs/uptime/incident-metadata/) to it with the key `DX service` and the service as the value.

## Manage the integration

Open the integration from **Integrations** → [Active integrations](https://incidents.betterstack.com/team/0/integrations ";_blank") to:

- **Configure** its name, instance URL, API token and service identifier.
- **Remove** the integration when you no longer need it. Incidents already sent stay in DX.

[info]
#### DX rejected the API token?
Create a new key in DX, paste it into **API token** on the integration and click **Save changes**.
[/info]

## Need help?

Please let us know at hello@betterstack.com.  
We're happy to help! 🙏
