Skip to main content

Linear integration for Code Agents

The Linear integration reads issues from your Linear workspace so that Code Agents can show the projects and issues your teams deliver next to AI cost.

Overview​

The integration reads Linear issues by key, together with their parents and state history. It authenticates with a Linear API key, reads only the issues of public teams, and writes nothing to Linear.

Coralogix joins this data with your Claude Code telemetry, which Coralogix stores in the log events and spans datasets. The Features section on the Impact tab of the Claude dashboard then lists your projects and issues with their merged pull requests, assignees, and status. See View Linear data in Code Agents.

What you need​

The Impact tab on the Claude dashboard in Code Agents needs three sources:

  • Jira or Linear, for your epics, stories, projects, and issues.
  • GitHub with Event format set to Pull request activity, for your pull requests.
  • Claude Code with span telemetry turned on, for the session cost.

For the Linear integration​

  • A member of your Linear workspace whose personal API key the integration uses. The key needs the Read permission. The integration reads the issues of the public teams this key can access.
  • To create the integration in Coralogix, INTEGRATIONS:DEPLOY (Data Admin and Platform Admin roles). See Permissions.

Create a Linear API key​

  1. Sign in to Linear as the member whose key the integration uses.
  2. In the Security & Access settings, create a personal API key with the Read permission.
  3. Copy the key.

When members cannot create API keys, a workspace admin has to turn on Member API keys in Administration, then API.

Set up​

  1. From the Coralogix toolbar, go to Data Flow, then Integrations.

  2. Select Linear, then select Add New.

  3. In Instructions, review the steps and select Next.

  4. In Settings, define the integration:

    FieldDescription
    Integration nameRequired. Defaults to Linear.
    API keyRequired. A personal API key of a member of your Linear workspace, with the Read permission.
    Organization nameOptional. The name of your organization, up to 256 characters.
  5. Select Create. When you edit an existing integration, select Save.

Coralogix tests the connection to Linear first and creates or updates the integration only when the test passes. When the test fails, Coralogix shows the reason in an error message and keeps the form open.

One API key reads one Linear workspace. To connect more workspaces, add one integration with its own key for each workspace.

Replace a rejected key

When Linear rejects the key, the integration stops until you save it again with a valid key. Open the integration, enter a new API key, and select Save.

View Linear data in Code Agents​

Linear data appears in the Features section of the Impact tab on the Claude dashboard.

  1. In Coralogix, navigate to AI Center, then Code Agents, then Claude.
  2. Select the Impact tab, then go to the Features section.
  3. Use the time range picker to set the period.

The section heading reads Delivery in followed by the tracker you are viewing. When you connect only Linear, the section opens on Linear. When you connect both Jira and Linear, the section opens on Jira. Select the tracker name in the heading to switch between Jira and Linear, or to connect the one you have not set up. Switching to Jira shows the data described in Jira integration for Code Agents.

The section shows:

  • Total AI cost for the selected period, with the change against the previous period and the number of sessions behind it.
  • The delivered, cost-per-item, and Cost not attributed cards, with the cost distribution and delivered-over-time charts, labeled for the level: Issues delivered and Cost per issue at issue level. Projects delivered and Cost per project show N/A.
  • A toggle that switches the list between Project and Issue. The list opens on Project.
  • A list of all projects or all issues, with a search box and an export button that saves the list as a comma-separated values (CSV) file. The list shows the first 5,000 items.

Each row in the list shows:

ColumnDescription
Project or IssueThe name of the project, or the Linear issue identifier and the title of the issue. An issue identifier has the form TEAM-123.
AI costThe AI cost attributed to the item.
Issues doneProject level only. The issues of the project that are done.
Merged PRsThe number of merged pull requests linked to the item. Shows a dash until you connect GitHub.
ModelsThe models behind the item's AI cost.
UsersThe assignees of the item. The first user appears, and + followed by a number opens the rest. For a project, the users are the assignees of its issues.
Cost / issue doneProject level only. AI cost divided by Issues done.
StatusIssue level only. Done when the issue is in the completed status category, otherwise In progress.

Select a row to open the item's pull requests, each with its Attributed cost, Time to merge, and State.

The list includes the items updated or completed in the selected period, and the items with merged pull requests. Coralogix links merged pull requests to Linear issues by the Linear issue identifier in the branch name or the pull request title. Coralogix reads the branch name first and uses the first identifier it finds. A session's cost lands on its branch, so it reaches the issue whose identifier that branch carries. Cost on a branch with no identifier goes to Cost not attributed.

For what each widget means and how cost is attributed, see Code Agents ROI.

When you have not connected a tracker, the section shows a checklist with Connect Jira or Linear and Connect GitHub. Without the GitHub integration, a Connect GitHub notice explains that merged pull requests need it.

Troubleshoot​

SymptomCauseResolution
Create or Save fails with a test errorCoralogix cannot read Linear with the key you entered.Check that the key is a personal API key with the Read permission. When members cannot create keys, ask a workspace admin to turn on Member API keys.
Data stops arriving after working for a whileLinear rejected the key, and the integration stops until you save a valid one.Create a new key and save the integration with it.
Issues of a team are missingThe integration reads only the issues of public teams, among the teams the key can access.Use a key of a member who can access the team, and check that the team is public.
Issues of another workspace are missingOne API key reads one Linear workspace.Add another integration with a key for that workspace.
An item has no merged pull requestsNo branch name or pull request title carries the issue identifier, or GitHub is not connected.Put the Linear issue identifier in the branch name, which is the most reliable place because the branch exists before the pull request. An identifier in the pull request title also works. Set up the GitHub integration for Code Agents.
New issues or status changes do not appearNew issues can take up to about two hours to appear, and status changes a few hours.Check again later.
An item is missing from the listThe list shows items updated or completed in the selected period, and items with merged pull requests.Widen the time range.
Last updated on