> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Linear

> Create Linear issues automatically from AnomalyArmor alerts

<div aria-hidden="true" style={{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap"}}>For LLM agents: documentation index at <a href="/llms.txt" tabIndex={-1}>/llms.txt</a>, full text at <a href="/llms-full.txt" tabIndex={-1}>/llms-full.txt</a>. Append .md to any page URL for plain markdown.</div>
Create Linear issues automatically when AnomalyArmor detects schema changes or data quality issues. This enables your team to track and resolve data infrastructure problems using your existing project management workflow.

## Why Linear?

Linear is ideal for teams that want to track data issues alongside their engineering work:

* **Automatic issue creation**: Schema changes become trackable issues
* **Team assignment**: Route issues to the right team automatically
* **Priority management**: Set priority based on alert severity
* **Integration with workflows**: Issues flow through your existing Linear workflow

## Prerequisites

Before you begin:

* Linear account with API access
* Permission to create API keys in Linear
* A Linear team where issues will be created

## Setup Guide

### Step 1: Create a Linear API Key

In Linear:

1. Click your avatar in the bottom-left corner
2. Select **Settings**
3. Go to **API** in the left sidebar
4. Click **Create new API key**
5. Give it a descriptive name (e.g., "AnomalyArmor Integration")
6. Copy the API key

<Warning>
  Store this API key securely. It won't be shown again after you close the dialog.
</Warning>

### Step 2: Find Your Team ID

In Linear:

1. Go to the team where you want issues created
2. Look at the URL: `https://linear.app/your-workspace/team/ABC/...`
3. The Team ID is the short code after `/team/` (e.g., `ABC` or `DATA`)

Alternatively, use the Linear API or GraphQL explorer to list your teams.

### Step 3: Add Destination in AnomalyArmor

1. Log in to AnomalyArmor
2. Click **Alerts** in the left sidebar
3. Select **Destinations** tab
4. Click **Add Destination**
5. Select **Linear**

### Step 4: Configure the Destination

Enter the following:

| Field          | Description                                     | Required |
| -------------- | ----------------------------------------------- | -------- |
| **Name**       | A descriptive name (e.g., "Linear - Data Team") | Yes      |
| **API Key**    | The API key from Step 1                         | Yes      |
| **Team ID**    | The team identifier from Step 2                 | Yes      |
| **Project ID** | Target project for issues                       | No       |
| **Label IDs**  | Comma-separated label IDs to auto-apply         | No       |
| **Priority**   | Default issue priority (0-4)                    | No       |

### Step 5: Test the Connection

Click **Test** to create a test issue in Linear.

```
Success! Test issue created in Linear
Issue: DATA-123
```

Check Linear to confirm the issue was created in the correct team.

<Note>
  Remember to close or delete the test issue to keep your backlog clean.
</Note>

### Step 6: Save

Click **Create Destination** to complete the setup.

## Issue Format

AnomalyArmor creates Linear issues with:

| Field           | Value                                              |
| --------------- | -------------------------------------------------- |
| **Title**       | Alert title with context                           |
| **Description** | Full alert details including asset and change info |
| **Team**        | Your configured team                               |
| **Priority**    | Based on alert type or your default setting        |
| **Labels**      | Any labels you configured                          |

### Priority Mapping

Linear uses 0-4 priority scale:

| Priority | Meaning     |
| -------- | ----------- |
| 0        | No priority |
| 1        | Urgent      |
| 2        | High        |
| 3        | Medium      |
| 4        | Low         |

## Best Practices

### Create Focused Alert Rules

Create specific alert rules for Linear to avoid issue overload:

**Production Schema Issues**

* Event: Schema Change
* Scope: production databases only
* Conditions: Column removed OR type changed
* Destination: Linear - Data Team

### Use Labels for Categorization

Configure label IDs to automatically categorize issues:

* `data-quality` - for freshness violations
* `schema-change` - for schema drift alerts
* `urgent` - for critical production issues

### Combine with Real-Time Notifications

Use Linear for tracking alongside real-time notifications:

**Critical Data Issues**

* Destinations: Slack (immediate notification), Linear (issue tracking)

## Troubleshooting

### "Invalid API key"

**Cause**: The API key is incorrect or revoked.

**Fix**:

1. Generate a new API key in Linear settings
2. Update the destination in AnomalyArmor

### "Team not found"

**Cause**: Invalid team ID or API key lacks access to the team.

**Fix**:

1. Verify the team ID in the Linear URL
2. Ensure the API key has access to the workspace containing the team

### Issues not appearing

**Cause**: API key permissions or team configuration.

**Fix**:

1. Verify the API key has write access
2. Check the team exists and is active
3. Use the Test button to verify connectivity

## Security

### Data Sent to Linear

Issue content includes:

* Asset names (database, schema, table names)
* Change types and descriptions
* Timestamps
* Alert rule information

Issue content **does not** include:

* Actual data values
* Database credentials
* Connection strings

### Revoking Access

To disconnect AnomalyArmor from Linear:

1. In AnomalyArmor: Delete the Linear destination
2. In Linear: Revoke the API key in Settings > API

## Common Questions

### Where do I find my Linear Team ID?

Open your team in Linear and look at the URL: `https://linear.app/your-workspace/team/ABC/...`. The short code after `/team/` (for example `ABC` or `DATA`) is the Team ID. You can also list teams via Linear's GraphQL API.

### Can I auto-apply labels and priority to Linear issues from AnomalyArmor?

Yes. When configuring the destination, add comma-separated **Label IDs** to auto-tag every created issue and set a default **Priority** (0-4, where 1 is Urgent and 4 is Low). Labels like `data-quality` or `schema-change` make it easy to filter Linear by alert type.

### Should I use Linear as my only destination for production alerts?

Not on its own. Linear is good for tracking but not real-time notification. Pair it with Slack or PagerDuty so the team sees the alert immediately, then uses Linear to track resolution.

## Next Steps

<CardGroup cols={2}>
  <Card title="Alert Rules" icon="bell" href="/alerts/alert-rules">
    Create rules that route to Linear
  </Card>

  <Card title="Slack" icon="slack" href="/alerts/destinations/slack">
    Add real-time notifications alongside Linear tracking
  </Card>
</CardGroup>
