---
title: GitHub integration for Code Agents
description: Send GitHub pull request activity to Coralogix to see merged pull requests, review times, and AI cost in the Delivery section of the Code Agents Impact tab.
url: https://coralogix.com/docs/integrations/ai-observability/github/
product: ai
feature: Code Agents
feature_id: ai-center-code-agents
feature_identifier: ai/ai-center-code-agents
last_updated: '2026-11-23'
---

# GitHub integration for Code Agents

Code Agents uses your GitHub pull request activity to show how much AI cost ships as merged pull requests, and how long those pull requests take at each stage. You collect that activity with the [GitHub](https://coralogix.com/docs/integrations/pull/github.md) integration by setting its **Event format** to **Pull request activity**.

## Overview

The GitHub integration receives events from your GitHub repositories through the Coralogix GitHub app. For Code Agents, you turn on **GitHub Events** and set **Event format** to **Pull request activity**. Coralogix then logs only pull request, push, review, and pull request comment events, each with a fixed set of fields.

Coralogix joins these logs with your [Claude Code](https://coralogix.com/docs/integrations/ai-observability/claude/claude-code.md) telemetry, which Coralogix stores in the [log events](https://coralogix.com/docs/user-guides/data-layer/default-dataspace/ai-raw-anthropic-claude-code-logs.md) and [spans](https://coralogix.com/docs/user-guides/data-layer/default-dataspace/ai-raw-anthropic-claude-code-spans.md) datasets. The **Delivery** section on the **Impact** tab of the Claude dashboard then shows merged pull requests, time per stage, and AI cost. See [View GitHub data in Code Agents](#view-github-data-in-code-agents).

### Event formats

The **Event format** setting has two options:

| Option                    | What Coralogix logs                                                                                                                                                                                                               |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Full**                  | The event types you select, as GitHub sends them. This is the default.                                                                                                                                                            |
| **Pull request activity** | Pull request, push, review, and pull request comment events only, with a fixed set of fields. Coralogix omits some events of these types, such as pull request assignments and review requests, tag pushes, and branch deletions. |

A **Pull request activity** log keeps fields such as the title, description, author, state, branches, and times of a pull request, the commits of a push, or the text and author of a review or comment, and drops the rest of GitHub's payload. Times are in Unix milliseconds. The event types you select do not apply to this format. Workflow metrics work with both formats.

Pull request activity logs have a different structure

Pull request activity logs have a different structure from **Full** logs. Before you switch an integration that already collects **Full** logs, update the queries, dashboards, and alerts that use the GitHub logs. Existing integrations keep the **Full** format until you change it.

## What you need

The **Impact** tab on the Claude dashboard in [Code Agents](https://coralogix.com/docs/user-guides/ai/code-agents.md) needs three sources:

* [Jira](https://coralogix.com/docs/integrations/ai-observability/jira.md) or [Linear](https://coralogix.com/docs/integrations/ai-observability/linear.md), for your epics, stories, projects, and issues.
* [GitHub](https://coralogix.com/docs/integrations/ai-observability/github.md#event-formats) with **Event format** set to **Pull request activity**, for your pull requests.
* [Claude Code](https://coralogix.com/docs/integrations/ai-observability/claude/claude-code.md) with [span telemetry](https://coralogix.com/docs/integrations/ai-observability/claude/claude-code.md#span-telemetry) turned on, for the session cost.

### For the GitHub integration

* A GitHub organization that has the Coralogix GitHub app installed. An organization owner installs the app. See [GitHub](https://coralogix.com/docs/integrations/pull/github.md#step-2-install-the-coralogix-app-on-your-organization).
* A GitHub user to authorize the integration. The user must be a member of an organization that has the app installed.
* To create the integration in Coralogix, `INTEGRATIONS:DEPLOY` (Data Admin and Platform Admin roles). See [Permissions](https://coralogix.com/docs/user-guides/aaa/access-control/permissions/permissions-list.md).

## Set up

The setup is the GitHub V2 setup. This page covers the settings that Code Agents depends on. For the app installation, the authorization, and every other setting, follow [GitHub](https://coralogix.com/docs/integrations/pull/github.md).

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

2. Select **GitHub V2**, then select **Add New**.

3. Enter an **Integration name**, select **GitHub Events**, confirm **Consent to U.S. data transfer** when it appears, and select **Create**.

4. Install the Coralogix app on your organization and authorize the connection. See [Step 2](https://coralogix.com/docs/integrations/pull/github.md#step-2-install-the-coralogix-app-on-your-organization) and [Step 3](https://coralogix.com/docs/integrations/pull/github.md#step-3-authorize-the-connection) of the GitHub setup.

5. In the **GitHub Events** panel, define the events:

   | Field                 | Description                                                                                                                                           |
   | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Integration name**  | Required. Defaults to `GitHub Events`.                                                                                                                |
   | **Application name**  | Required. Defaults to `github`.                                                                                                                       |
   | **Subsystem name**    | Optional. When empty, Coralogix uses the GitHub organization, then `owner/repository`, then `github`.                                                 |
   | **Event format**      | Select **Pull request activity**.                                                                                                                     |
   | **Organization name** | Optional. Shown when **Event format** is **Pull request activity**. Your organization's name, added to every pull request activity log.               |
   | **Workflow metrics**  | Optional, off by default. Produces metrics from completed workflow runs and jobs.                                                                     |
   | **All installations** | On by default. Receives events from every organization that has the app installed. Turn it off to select specific installations in **Installations**. |

6. Select **Create**, then select **Complete** in **Confirmation**.

To change an existing integration, open it, set **Event format** to **Pull request activity** in the **GitHub Events** panel, and select **Save**.

GitHub - Code Agents ROI card

When your account lists a **GitHub - Code Agents ROI** card, select it instead of **GitHub V2**. The card opens the same setup with **GitHub Events** on, **Event format** set to **Pull request activity**, and **All installations** on. You enter only the integration name, the application name, an optional subsystem name, and the consent. Then you authorize.

## View GitHub data in Code Agents

GitHub data appears in the **Delivery** 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 **Delivery** section.
3. Use the time range picker to set the period.

When GitHub is not connected, the section shows a checklist with a **Connect GitHub** step. Select it to open the GitHub setup.

The section opens with the heading **From cost to shipped code** and shows:

* **AI cost** for the selected period, with the change against the previous period.
* **Merged PRs**: the pull requests with an attributed agent session that merged in the selected period, compared with the previous period.
* **Merged PRs over time**: a chart of those pull requests over the period. Drag across the chart to narrow the period.
* **Where the time goes**: the median days of each stage of a pull request, for AI-assisted pull requests compared with pull requests in the same repositories that have no AI session.
* A breakdown of cost by user or by model.

A pull request counts as AI-assisted when a commit pushed to its branch has a `Co-authored-by: Claude` trailer, its author is `claude[bot]`, or its branch starts with `claude/`. Claude Code adds the trailer by default. See [How AI-assisted pull requests are identified](https://coralogix.com/docs/user-guides/ai/code-agents/roi.md#how-ai-assisted-pull-requests-are-identified).

### Stages

**Where the time goes** has three stages. Each stage shows the AI-assisted median, a change indicator against the no-AI baseline, and the baseline value as **No AI session**.

| Stage                        | What it measures                                            |
| ---------------------------- | ----------------------------------------------------------- |
| **First commit → PR opened** | The time from the first commit to opening the pull request. |
| **PR opened → first review** | The time from opening the pull request to its first review. |
| **First review → merged**    | The time from the first review to the merge.                |

The two review stages add up to the time to merge.

### Breakdown

Select **Users** or **Models** to change the breakdown. The breakdown opens on **Users**. Each view has a search box and an export button that saves the table as a comma-separated values (CSV) file.

| View       | Columns                                                                                                                                                                                                                                                                                                      |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Users**  | **User** and **AI cost**, with the change against the previous period.                                                                                                                                                                                                                                       |
| **Models** | **Model**, **AI cost**, and **Time to merge PR**. The model rows show a dash in **Time to merge PR**, because pull requests are not tied to a model yet. The last row, **No AI session**, shows the median time to merge for the same repositories and period with no code agent linked to the pull request. |

## Troubleshoot

| Symptom                                             | Cause                                                                                                | Resolution                                                                                              |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| The **Delivery** section asks you to connect GitHub | No authorized GitHub V2 integration exists.                                                          | Set up the integration on this page, and complete the authorization.                                    |
| **Merged PRs** shows no data                        | GitHub reported no pull requests for the period.                                                     | Check that the organization that owns the repositories has the app installed, and widen the time range. |
| Queries or alerts on GitHub logs stopped matching   | The integration now uses **Pull request activity**, which structures logs differently from **Full**. | Update the queries, dashboards, and alerts to the new structure.                                        |

For installation, authorization, and event delivery problems, see [Troubleshooting](https://coralogix.com/docs/integrations/pull/github.md#troubleshooting) in the GitHub integration.

## Related resources

* [GitHub](https://coralogix.com/docs/integrations/pull/github.md)
* [Jira integration for Code Agents](https://coralogix.com/docs/integrations/ai-observability/jira.md)
* [Linear integration for Code Agents](https://coralogix.com/docs/integrations/ai-observability/linear.md)
* [Claude Code integration](https://coralogix.com/docs/integrations/ai-observability/claude/claude-code.md)
* [Code Agents Intelligence](https://coralogix.com/docs/user-guides/ai/code-agents.md)
* [Code Agents ROI](https://coralogix.com/docs/user-guides/ai/code-agents/roi.md)
* [Claude Code log events dataset](https://coralogix.com/docs/user-guides/data-layer/default-dataspace/ai-raw-anthropic-claude-code-logs.md)
* [Claude Code spans dataset](https://coralogix.com/docs/user-guides/data-layer/default-dataspace/ai-raw-anthropic-claude-code-spans.md)
