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 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 telemetry, which Coralogix stores in the log events and spans 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.
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 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 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 GitHub integration
- A GitHub organization that has the Coralogix GitHub app installed. An organization owner installs the app. See GitHub.
- 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.
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.
-
From the Coralogix toolbar, go to Data Flow, then Integrations.
-
Select GitHub V2, then select Add New.
-
Enter an Integration name, select GitHub Events, confirm Consent to U.S. data transfer when it appears, and select Create.
-
Install the Coralogix app on your organization and authorize the connection. See Step 2 and Step 3 of the GitHub setup.
-
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, thengithub.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. -
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.
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.
- In Coralogix, navigate to AI Center, then Code Agents, then Claude.
- Select the Impact tab, then go to the Delivery section.
- 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.
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 in the GitHub integration.