---
title: Integrate Linear with Error Tracking
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Error Tracking > Error Tracking Ticketing System Integrations >
  Integrate Linear with Error Tracking
---

# Integrate Linear with Error Tracking

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Integrate Linear with Error Tracking to create and link Linear issues to Error Tracking issues. With this integration, you can:

- Create Linear issues directly from the Error Tracking issue panel
- Group multiple Error Tracking issues into a single Linear issue

## Prerequisites{% #prerequisites %}

1. Set up the [Linear integration for Datadog](https://docs.datadoghq.com/integrations/linear.md).
1. Make sure you have the following [permissions](https://docs.datadoghq.com/account_management/rbac/permissions.md):
   - Error Tracking Read
   - Error Tracking Issue Write
   - Cases Read
   - Cases Write
   - Integrations Read

## Create a Linear issue from an Error Tracking issue{% #create-a-linear-issue-from-an-error-tracking-issue %}

Create a Linear issue directly from the issue panel to group investigation efforts on that issue:

1. Navigate to the [Error Tracking Explorer](https://app.datadoghq.com/error-tracking/).
1. Click on an issue to open the issue panel.
1. In the issue panel, in the **Actions** dropdown, click **Add Linear issue**.
1. Choose the Linear workspace and team for the new Linear issue.
1. Optionally, open Data Sync settings to configure how data syncs between Datadog and Linear.
1. Click **Create** to create the Linear issue.

{% image
   source="https://docs.dd-static.net/images/error_tracking/create-linear-issue.f92c99f740490a176d478fa6a25c6604.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/error_tracking/create-linear-issue.f92c99f740490a176d478fa6a25c6604.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Create a Linear issue from an Error Tracking issue" /%}

After the Linear issue is created, it is linked to the Error Tracking issue and appears in the issue panel. The Error Tracking issue status automatically changes to **REVIEWED**.

When an Error Tracking issue is linked to a Linear issue, the state, assignee, and comments are two-way synced. For details, see State two-way sync between Error Tracking issues and Linear issues.

## Group multiple Error Tracking issues into a single Linear issue{% #group-multiple-error-tracking-issues-into-a-single-linear-issue %}

Attach multiple Error Tracking issues to a single Linear issue to group correlated issues into a single unit of work:

1. Navigate to the [Error Tracking Explorer](https://app.datadoghq.com/error-tracking/).
1. Click on an issue to open the issue panel.
1. In the issue panel, in the **Actions** dropdown, click **Add Linear issue**.
1. In the **Add to Existing** tab, paste the URL of the Linear issue in which you want to group your Error Tracking issues.
1. Optionally, open Data Sync settings to configure how data syncs between Datadog and Linear.
1. Click **Link to Issue** to attach the Error Tracking issue to the Linear issue.
1. Repeat these actions on all the Error Tracking issues you want to add to this group.

{% image
   source="https://docs.dd-static.net/images/error_tracking/add-to-existing-linear-issue.c03f995366a00e2649a3973d887fe66e.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/error_tracking/add-to-existing-linear-issue.c03f995366a00e2649a3973d887fe66e.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Add an Error Tracking issue to an existing Linear issue" /%}

When several Error Tracking issues are linked to a single Linear issue, the state, assignee, and comments are two-way synced. For details, see State two-way sync between Error Tracking issues and Linear issues.

The relationship between Linear issues and Error Tracking issues is a 1:N relationship. A single Linear issue can be linked to multiple Error Tracking issues, but an Error Tracking issue can be linked to only one Linear issue.

## State two-way sync between Error Tracking issues and Linear issues{% #state-two-way-sync-between-error-tracking-issues-and-linear-issues %}

If two-way sync is enabled and configured between Datadog and Linear teams, the states of Error Tracking issues and Linear issues are mirrored. If you encounter unexpected behavior, see the Troubleshooting section for how to fix your configuration.

### Single Error Tracking issue linked to single Linear issue{% #single-error-tracking-issue-linked-to-single-linear-issue %}

When a single Error Tracking issue is linked to a Linear issue, their states are two-way synced. The mapping between these states can be configured in the Data Sync settings of the Linear issue creation form:

{% image
   source="https://docs.dd-static.net/images/error_tracking/linear-status-mapping.a7a8e14880094efedafc5408662d82df.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/error_tracking/linear-status-mapping.a7a8e14880094efedafc5408662d82df.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Map Error Tracking issue states to Linear issue states" /%}

### Multiple Error Tracking issues linked to single Linear issue{% #multiple-error-tracking-issues-linked-to-single-linear-issue %}

When multiple Error Tracking issues are linked to the same Linear issue, their states sync depending on the action you take. If you update the status of the Linear issue, all linked Error Tracking issues are updated to mirror this state according to your mapping.

Assuming that your mapping is defined as follows:

| Case Management status group | Linear issue state |
| ---------------------------- | ------------------ |
| `Open`                       | `Todo`             |
| `In Progress`                | `In Progress`      |
| `Closed`                     | `Done`             |

If you update the state of an Error Tracking issue, the resulting state of other linked Error Tracking issues and the Linear issue follows these rules:

| Initial state                                                                     | Action                                                          | Resulting state                                                                                                                       |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| The Linear issue is `Done` and all linked Error Tracking issues are `Resolved`.   | Update one Error Tracking issue to `For Review`.                | The Linear issue changes to `Todo`. The other linked Error Tracking issues remain `Resolved`.                                         |
| The Linear issue is `Todo` and all linked Error Tracking issues are `For Review`. | Update one Error Tracking issue to `Resolved`.                  | The Linear issue stays `Todo`. The updated Error Tracking issue is `Resolved`; the others remain `For Review`.                        |
| The Linear issue is `Done`, and an unlinked Error Tracking issue is `For Review`. | Link the `For Review` Error Tracking issue to the Linear issue. | The Linear issue stays `Done`. All linked Error Tracking issues are `Resolved`, including the newly linked one.                       |
| The Linear issue is `Todo`, and an unlinked Error Tracking issue is `Resolved`.   | Link the `Resolved` Error Tracking issue to the Linear issue.   | The Linear issue stays `Todo`. The other linked Error Tracking issues remain `For Review`, and the newly linked one stays `Resolved`. |

## Troubleshooting{% #troubleshooting %}

If you experience unexpected behaviors using ticketing systems with Error Tracking, see the following troubleshooting steps. If you continue to have trouble, reach out to [Datadog support](https://docs.datadoghq.com/help/).

### Sync is broken between Linear and Error Tracking{% #sync-is-broken-between-linear-and-error-tracking %}

If you experience syncing issues between your Linear issues and the corresponding Error Tracking issues (such as the Error Tracking issue state not being updated when you close the Linear issue), verify that the following steps are all properly configured:

1. In the issue panel, make sure that the Error Tracking issue is correctly linked to the Linear issue.

1. Verify that Case Management is correctly configured to sync with Linear.

Datadog automatically creates a Case Management case to link Error Tracking issues and Linear issues. To check the configuration:

   - From the issue panel, open the linked Case Management case to find its project.
   - In Case Management settings, verify that the Linear integration is enabled for this project.
   - Verify that the correct Linear workspace and team are configured.

   {% image
      source="https://docs.dd-static.net/images/error_tracking/enable-linear-for-case-management-project.07529207af5e28bb9d7b544724441158.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/error_tracking/enable-linear-for-case-management-project.07529207af5e28bb9d7b544724441158.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="Enable Linear for your Case Management project" /%}

1. In Case Management settings, make sure that sync between Case Management and Linear is enabled for this project. Check that the fields you want to sync are configured for two-way sync between Datadog and Linear.

   {% image
      source="https://docs.dd-static.net/images/error_tracking/sync-data-between-case-management-and-linear.ec8222075a772307001e9d5bcb07a4b7.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/error_tracking/sync-data-between-case-management-and-linear.ec8222075a772307001e9d5bcb07a4b7.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="Sync data between Case Management and Linear" /%}

1. In your Linear settings, check that a webhook is configured to automatically sync updates between Datadog and Linear. If the webhook is missing, [add a Linear webhook](https://docs.datadoghq.com/integrations/linear.md#configure-a-linear-webhook).

## Further reading{% #further-reading %}

- [Error Tracking Explorer](https://docs.datadoghq.com/error_tracking/explorer.md)
- [Issue States in Error Tracking](https://docs.datadoghq.com/error_tracking/issue_states.md)
- [Linear Integration](https://docs.datadoghq.com/integrations/linear.md)
