Skip to content

GitHub Copilot Usage integration with Coralogix

The GitHub Copilot Usage integration is a Coralogix-managed integration that collects your organizations' GitHub Copilot usage and billing data once a day and writes it to Coralogix as metrics. You authorize Coralogix once through GitHub and install the Coralogix GitHub App on the organizations you want to track; Coralogix then pulls the Copilot reports on a daily schedule from every organization the authorization can access — no agent, collector, or code to run on your side.

Once connected, you get organization-wide adoption and activity totals, per-user activity, team membership, and month-to-date billing as Prometheus-style gauges that you can chart, alert on, and join by user, team, model, IDE, feature, and language.

How it works

Each day, for every organization your authorization can access, Coralogix reads the following from GitHub for the previous day:
SourceWhat it provides
organization-1-day reportOrg-wide active-user counts, activity totals, command-line interface (CLI) totals, pull-request metrics, AI-adoption-phase distribution, and per-IDE/feature/language/model breakdowns.
users-1-day reportPer-user activity totals, CLI sub-metrics, and per-IDE/feature/language/model breakdowns.
user-teams-1-day reportThe user↔team memberships used to join per-user metrics to teams.
Billing usage summary (product=copilot)Month-to-date quantities and amounts per SKU, model, and unit type.
Organization members (GraphQL)Adds user_email and user_name labels to per-user metrics.

Key behaviors to keep in mind when querying:

  • All authorized organizations. Coralogix collects from every organization where the Coralogix GitHub App is installed and your authorization can reach it. Every metric carries an organization label, so you filter or break down by org.
  • Daily cadence. GitHub publishes a day's report during the following day, so the most recent data point trails the current time by up to a day plus the daily poll time.
  • One sample per day. Every metric is stamped at 23:59:59 UTC of the report day. A daily aggregate describes the whole day, so it sits at the period close.
  • Daily totals, not cumulative. Activity counts (lines of code, interactions, active users, and so on) are the total for that report day. The github_copilot_billing_* metrics are the exception — they are month-to-date values, re-published each day.
  • Absent values are skipped. A field that GitHub omits is never emitted as 0; the series does not exist for that day. A query that finds no series means "not reported," not "zero."
  • Breakdowns carry a _by_<dimension> suffix (for example, ..._by_ide) so they never collide with — or double-count against — the matching base totals.

What you need

  • One or more GitHub organizations on a Copilot plan that exposes the Copilot metrics and billing APIs.
  • The Coralogix GitHub App (coralogix-copilot-observability) installed on each organization you want to track. At install time, the app requests read access to Copilot metrics, organization members, and billing.
  • Permission to authorize the app on your behalf — completing the GitHub authorization requires an organization owner/admin.

Set up

  1. In Coralogix, create the GitHub Copilot Usage integration and fill in the basic fields:

    SettingRequiredPurpose
    Integration nameYesA name for this integration in Coralogix. Defaults to GitHub Copilot Usage.
    Application nameYesCoralogix application tag applied to the ingested metrics. Defaults to copilot.
    Subsystem nameNoOptional Coralogix subsystem tag for the ingested metrics.
  2. Click Authorize. Coralogix redirects you to GitHub to authorize the Coralogix GitHub App. You must be an organization owner/admin to complete this step.

  3. Approve the authorization, and install (or confirm) the coralogix-copilot-observability app on every organization whose Copilot usage you want to collect. You can add more organizations at any time.
  4. GitHub returns you to Coralogix and the integration finishes provisioning.

Once authorized, Coralogix discovers every organization the authorization can access and collects from all of them. After the first daily collection runs, search Metrics Explorer for the github_copilot_ prefix to confirm data is flowing.

Created, but no organizations yet

If you authorize before the Coralogix GitHub App is installed on any organization, the integration is created but has nothing to collect. Install the app from https://github.com/apps/coralogix-copilot-observability on at least one organization on a Copilot plan; collection starts on the next daily run. You can install it now or later.

Metrics reference

All metrics are gauges and appear in Metrics Explorer under the github_copilot_ prefix. Every series carries an organization label. Per-user series additionally carry user_login (always), user_id (when GitHub reports it), and user_email / user_name (when resolvable from organization members).

Billing (month-to-date)

One set per billing row, keyed by sku, unit_type, and — on premium-request rows — model.
MetricWhat it tracks
github_copilot_billing_gross_quantityGross usage quantity for the SKU.
github_copilot_billing_discount_quantityQuantity covered by included allowances or discounts.
github_copilot_billing_net_quantityBillable quantity after discounts.
github_copilot_billing_gross_amountGross monetary amount.
github_copilot_billing_discount_amountDiscounted monetary amount.
github_copilot_billing_net_amountNet monetary amount charged.
github_copilot_billing_price_per_unitUnit price for the SKU.

Organization activity

Org-wide totals from the organization-1-day report. Active-user counts and base activity totals carry only the organization label.
MetricWhat it tracks
github_copilot_org_daily_active_usersDaily active Copilot users.
github_copilot_org_weekly_active_usersWeekly active Copilot users.
github_copilot_org_monthly_active_usersMonthly active Copilot users.
github_copilot_org_daily_active_cli_usersDaily active Copilot CLI users.
github_copilot_org_daily_active_copilot_cloud_agent_usersDaily active Copilot cloud-agent users.
github_copilot_org_monthly_active_chat_usersMonthly active chat users.
github_copilot_org_monthly_active_agent_usersMonthly active agent users.
github_copilot_org_daily_active_copilot_code_review_usersDaily users who actively used Copilot code review.
github_copilot_org_daily_passive_copilot_code_review_usersDaily users who received Copilot code review passively.
github_copilot_org_code_generation_activity_countCode-generation activities.
github_copilot_org_code_acceptance_activity_countCode-acceptance activities.
github_copilot_org_user_initiated_interaction_countUser-initiated interactions.
github_copilot_org_loc_suggested_to_add_sumLines of code suggested for addition.
github_copilot_org_loc_suggested_to_delete_sumLines of code suggested for deletion.
github_copilot_org_loc_added_sumLines of code added.
github_copilot_org_loc_deleted_sumLines of code deleted.

CLI totals (emitted only when the org used the CLI that day):
MetricWhat it tracks
github_copilot_org_cli_session_countCLI sessions.
github_copilot_org_cli_request_countCLI requests.
github_copilot_org_cli_prompt_countCLI prompts.
github_copilot_org_cli_output_tokens_sumCLI output tokens.
github_copilot_org_cli_prompt_tokens_sumCLI prompt tokens.
github_copilot_org_cli_avg_tokens_per_requestAverage tokens per CLI request.

Pull-request metrics (emitted only when the report includes a pull-request section). The two ..._by_comment_type metrics carry an additional comment_type label.
MetricWhat it tracks
github_copilot_org_pull_requests_createdPull requests created.
github_copilot_org_pull_requests_reviewedPull requests reviewed.
github_copilot_org_pull_requests_mergedPull requests merged.
github_copilot_org_pull_requests_reviewed_by_copilotPull requests reviewed by Copilot.
github_copilot_org_pull_requests_created_by_copilotPull requests created by Copilot.
github_copilot_org_pull_requests_copilot_suggestionsCopilot review suggestions.
github_copilot_org_pull_requests_copilot_applied_suggestionsCopilot review suggestions applied.
github_copilot_org_pull_requests_suggestionsAll review suggestions.
github_copilot_org_pull_requests_applied_suggestionsAll review suggestions applied.
github_copilot_org_pull_requests_merged_created_by_copilotMerged pull requests created by Copilot.
github_copilot_org_pull_requests_merged_reviewed_by_copilotMerged pull requests reviewed by Copilot.
github_copilot_org_pull_requests_median_minutes_to_mergeMedian minutes to merge.
github_copilot_org_pull_requests_median_minutes_to_merge_copilot_authoredMedian minutes to merge for Copilot-authored pull requests.
github_copilot_org_pull_requests_median_minutes_to_merge_copilot_reviewedMedian minutes to merge for Copilot-reviewed pull requests.
github_copilot_org_pull_requests_copilot_suggestions_by_comment_typeCopilot suggestions, by comment_type.
github_copilot_org_pull_requests_copilot_applied_suggestions_by_comment_typeApplied Copilot suggestions, by comment_type.

AI-adoption-phase distribution (one series per phase):
MetricWhat it tracks
github_copilot_org_adoption_phase_engaged_usersEngaged users in the phase.
github_copilot_org_adoption_phase_avg_user_initiated_interactionsAverage user-initiated interactions per user in the phase.
github_copilot_org_adoption_phase_avg_code_generation_activitiesAverage code-generation activities per user in the phase.
github_copilot_org_adoption_phase_avg_code_acceptance_activitiesAverage code-acceptance activities per user in the phase.
github_copilot_org_adoption_phase_avg_loc_addedAverage lines of code added per user in the phase.

Organization breakdowns

Org totals sliced by dimension. Each metric carries the dimension label(s) shown.
MetricExtra labels
github_copilot_org_code_generation_activity_count_by_ideide
github_copilot_org_code_acceptance_activity_count_by_ideide
github_copilot_org_user_initiated_interaction_count_by_ideide
github_copilot_org_loc_suggested_to_add_sum_by_ideide
github_copilot_org_loc_suggested_to_delete_sum_by_ideide
github_copilot_org_loc_added_sum_by_ideide
github_copilot_org_loc_deleted_sum_by_ideide
github_copilot_org_code_generation_activity_count_by_featurefeature
github_copilot_org_code_acceptance_activity_count_by_featurefeature
github_copilot_org_user_initiated_interaction_count_by_featurefeature
github_copilot_org_loc_suggested_to_add_sum_by_featurefeature
github_copilot_org_loc_suggested_to_delete_sum_by_featurefeature
github_copilot_org_loc_added_sum_by_featurefeature
github_copilot_org_loc_deleted_sum_by_featurefeature
github_copilot_org_code_generation_activity_count_by_language_featurelanguage, feature
github_copilot_org_code_acceptance_activity_count_by_language_featurelanguage, feature
github_copilot_org_loc_suggested_to_add_sum_by_language_featurelanguage, feature
github_copilot_org_loc_suggested_to_delete_sum_by_language_featurelanguage, feature
github_copilot_org_loc_added_sum_by_language_featurelanguage, feature
github_copilot_org_loc_deleted_sum_by_language_featurelanguage, feature
github_copilot_org_user_initiated_interaction_count_by_model_featuremodel, feature
github_copilot_org_code_generation_activity_count_by_model_featuremodel, feature
github_copilot_org_loc_added_sum_by_model_featuremodel, feature

Per-user activity

Per-user totals from the users-1-day report. Each metric carries the user identity labels described above.
MetricWhat it tracks
github_copilot_user_loc_suggested_to_add_sumLines of code suggested for addition.
github_copilot_user_loc_suggested_to_delete_sumLines of code suggested for deletion.
github_copilot_user_loc_added_sumLines of code added.
github_copilot_user_loc_deleted_sumLines of code deleted.
github_copilot_user_code_generation_activity_countCode-generation activities.
github_copilot_user_code_acceptance_activity_countCode-acceptance activities.
github_copilot_user_user_initiated_interaction_countUser-initiated interactions.

CLI sub-metrics (emitted only for users who used the CLI that day):
MetricWhat it tracks
github_copilot_user_cli_session_countCLI sessions.
github_copilot_user_cli_request_countCLI requests.
github_copilot_user_cli_prompt_countCLI prompts.
github_copilot_user_cli_output_tokens_sumCLI output tokens.
github_copilot_user_cli_prompt_tokens_sumCLI prompt tokens.
github_copilot_user_cli_avg_tokens_per_requestAverage tokens per CLI request.

Per-user breakdowns

Per-user totals sliced by dimension. Each metric carries the user identity labels plus the dimension label(s) shown.
MetricExtra labels
github_copilot_user_code_generation_activity_count_by_ideide
github_copilot_user_code_acceptance_activity_count_by_ideide
github_copilot_user_user_initiated_interaction_count_by_ideide
github_copilot_user_loc_suggested_to_add_sum_by_ideide
github_copilot_user_loc_suggested_to_delete_sum_by_ideide
github_copilot_user_loc_added_sum_by_ideide
github_copilot_user_loc_deleted_sum_by_ideide
github_copilot_user_code_generation_activity_count_by_featurefeature
github_copilot_user_code_acceptance_activity_count_by_featurefeature
github_copilot_user_user_initiated_interaction_count_by_featurefeature
github_copilot_user_loc_suggested_to_add_sum_by_featurefeature
github_copilot_user_loc_suggested_to_delete_sum_by_featurefeature
github_copilot_user_loc_added_sum_by_featurefeature
github_copilot_user_loc_deleted_sum_by_featurefeature
github_copilot_user_code_generation_activity_count_by_language_featurelanguage, feature
github_copilot_user_code_acceptance_activity_count_by_language_featurelanguage, feature
github_copilot_user_loc_suggested_to_add_sum_by_language_featurelanguage, feature
github_copilot_user_loc_suggested_to_delete_sum_by_language_featurelanguage, feature
github_copilot_user_loc_added_sum_by_language_featurelanguage, feature
github_copilot_user_loc_deleted_sum_by_language_featurelanguage, feature
github_copilot_user_user_initiated_interaction_count_by_model_featuremodel, feature
github_copilot_user_code_generation_activity_count_by_model_featuremodel, feature
github_copilot_user_loc_added_sum_by_model_featuremodel, feature

Team membership

A join-table metric whose value is always 1. It exists so you can attribute per-user metrics to teams in queries (a user can appear in several teams, so there is one series per user↔team edge).
MetricLabelsValue
github_copilot_user_team_membershiporganization, user_login, team_slug, team_id, user_id (when reported)1

Teams with fewer than 5 Copilot users are omitted

GitHub excludes teams with fewer than 5 seated Copilot users from the user-teams-1-day report, so github_copilot_user_team_membership has no series for those teams. Their members' per-user activity still arrives (via the users-1-day report), but any team join built on the membership metric will not attribute it to those small teams — team-level totals under-count rather than the activity going missing. See GitHub's team-level metrics reference.

Labels

LabelOnMeaning
organizationAll metricsThe GitHub organization slug.
user_loginPer-user and membership metricsThe GitHub login.
user_idPer-user and membership metrics (when reported)Stable GitHub user ID — the preferred join key.
user_emailPer-user metrics (when resolvable)Organization-verified email.
user_namePer-user metrics (when resolvable)Display name.
skuBilling metricsBilling SKU.
unit_typeBilling metricsBilling unit, for example ai-units or requests.
modelBilling premium-request rows and ..._by_model_feature metricsModel name.
ide..._by_ide metricsIDE, for example vscode.
feature..._by_feature, ..._by_language_feature, ..._by_model_featureCopilot feature, for example code_completion.
language..._by_language_feature metricsProgramming language.
comment_type..._by_comment_type pull-request metricsPull-request comment category.
phase..._adoption_phase_* metricsAI adoption phase.
team_slug, team_idgithub_copilot_user_team_membershipTeam identifiers.

Query examples

These metrics are gauges. Query them in Metrics Explorer, Custom Dashboards, or alerts using PromQL. Because each metric carries one sample per day, range queries chart a daily series directly.

Common queries

Lines of code Copilot added across the organization, per day:

github_copilot_org_loc_added_sum{organization="my-org"}

Month-to-date net spend, broken down by model (premium requests):

sum by (model) (github_copilot_billing_net_amount{sku="copilot_premium_request"})

Organization-wide code acceptance rate (accepted ÷ generated):

github_copilot_org_code_acceptance_activity_count{organization="my-org"}
/
github_copilot_org_code_generation_activity_count{organization="my-org"}

Top 10 users by interactions on the latest report day. Wrap the daily gauge in last_over_time(...[2d]) so the ranking resolves to the most recent daily sample whenever you run it — a bare instant query returns nothing outside Prometheus's 5-minute lookback window, since each series has one sample per day:

topk(10, last_over_time(github_copilot_user_user_initiated_interaction_count{organization="my-org"}[2d]))

Interactions by model and feature across the organization:

sum by (model, feature) (github_copilot_org_user_initiated_interaction_count_by_model_feature{organization="my-org"})

Weekly lines added — sum the seven daily samples (use sum_over_time for activity counts, never for the month-to-date billing metrics):

sum_over_time(github_copilot_org_loc_added_sum{organization="my-org"}[7d])

Join per-user metrics to teams

The per-user metrics do not carry a team label — attribute them to teams by joining against github_copilot_user_team_membership, whose value is always 1. Put the membership metric (the higher-cardinality side, since a user can be in several teams) on the left and use group_left. Join on user_id, the stable per-user key, scoped by organization:

sum by (team_slug) (
    github_copilot_user_team_membership
  * on (organization, user_id) group_left ()
    github_copilot_user_loc_added_sum
)

The same pattern aggregates any per-user metric per team — for example, interactions:

sum by (team_slug) (
    github_copilot_user_team_membership
  * on (organization, user_id) group_left ()
    github_copilot_user_user_initiated_interaction_count
)

To keep the per-user breakdown alongside the team instead of aggregating, drop the sum. The membership series already carries team_slug, team_id, and user_login, so the result keeps them; list any right-side identity labels you also want in group_left:

  github_copilot_user_team_membership
* on (organization, user_id) group_left (user_email, user_name)
  github_copilot_user_code_acceptance_activity_count

Joining when user_id is absent

user_id is present whenever GitHub reports it, on both the per-user and the membership series, so the keys align. For the rare user without a user_id, join on user_login instead — on (organization, user_login).

Join across breakdowns

Per-user breakdown metrics already carry their dimension labels, so you can attribute, for example, per-team lines added by IDE without any extra source:

sum by (team_slug, ide) (
    github_copilot_user_team_membership
  * on (organization, user_id) group_left ()
    github_copilot_user_loc_added_sum_by_ide
)

Troubleshoot

The integration was created but no organizations are tracked

This means the Coralogix GitHub App is not installed on any organization your authorization can access, so there is nothing to collect. Install coralogix-copilot-observability on at least one organization on a Copilot plan, then wait for the next daily collection.

No data appears after setup

GitHub publishes a day's report during the following day. The first data point arrives only after the next daily collection runs and GitHub has published the previous day's report. Confirm the Coralogix GitHub App is installed on the organization and that the organization is on a Copilot plan that exposes the metrics API.

Per-user metrics have no user_email or user_name labels

These labels come from the organization members listing. If the GitHub App installation lacks read access to organization members, collection still succeeds but per-user series carry only user_login (and user_id). Grant members read access to the installation to restore the labels.

A metric is missing for some days

Absent values are skipped, never emitted as 0. If GitHub did not report a field for a day, no series exists for it. Treat a missing series as "not reported," not zero.