Track GitHub Copilot usage and cost per developer
GitHub Copilot bills by plan and by AI credits, so the GitHub billing page shows what each seat consumed. It doesn't show what the agent did in a session or how many tokens a task took. Langfuse traces Copilot's agent sessions in VS Code and the Copilot CLI, with token usage per model call, so you can see usage per developer, per session, and per model.
TL;DR: There are two ways to get Copilot data into Langfuse. Copilot's built-in OpenTelemetry export covers every model, including GitHub-hosted ones, and records spans and token counts by default. The Langfuse AI Gateway covers only bring-your-own-key (BYOK) models, but adds central key custody and cost from the actual provider calls. Most teams start with OpenTelemetry.
![]()
How Copilot usage is billed
As of November 2026, GitHub's plans page lists Free, Pro, Pro+, and Max plans for individuals, plus Business and Enterprise for organizations. Each plan includes a monthly allowance of GitHub AI credits (1 credit = $0.01), and admins can set a dollar budget for usage beyond it. Code completions and next edit suggestions don't use credits.
BYOK models are different: requests to them are billed directly by the model provider and don't count against Copilot quotas, according to GitHub's BYOK announcement. That split decides which tracking path works for which model.
Path 1: Copilot's OpenTelemetry export
Copilot agent mode in VS Code and the Copilot CLI can export OpenTelemetry traces, and Langfuse is an OpenTelemetry backend. The GitHub Copilot integration shows the exporter settings.
What arrives in Langfuse:
- Model calls follow the OpenTelemetry GenAI conventions and map to Langfuse generations.
- Token usage includes input, output, cache-read, cache-creation, and reasoning tokens per model call.
- Tool executions appear as observations nested in the session.
Langfuse computes cost from the tokens and its model prices. For GitHub-hosted models, that is an API-equivalent estimate: useful for comparing sessions and developers, but not the same number as your AI credit consumption.
By default, Copilot exports span structure, timing, and token counts, but no prompts, responses, or tool arguments. To see inputs and outputs in Langfuse, turn on content capture as described on the integration page.
Path 2: the Langfuse AI Gateway for BYOK models
When your organization brings its own OpenAI or Anthropic key to Copilot, you can point that BYOK provider at the Langfuse AI Gateway instead of the provider. Each developer uses their own gateway key, and the provider key stays in Langfuse.
For the Copilot CLI with an Anthropic credential:
# 🇪🇺 EU region
export COPILOT_PROVIDER_BASE_URL="https://gateway.cloud.langfuse.com/anthropic"
# 🇺🇸 US region: https://gateway.us.cloud.langfuse.com
# 🇯🇵 Japan region: https://gateway.jp.cloud.langfuse.com
# ⚕️ HIPAA region: https://gateway.hipaa.cloud.langfuse.com
# Self-hosted: the gateway URL of your deployment
export COPILOT_PROVIDER_TYPE="anthropic"
export COPILOT_PROVIDER_API_KEY="<your-gateway-key>"
export COPILOT_MODEL="<model-id>"
copilotThe Copilot gateway guide covers the OpenAI route and the GitHub Copilot app.
Only BYOK models go through the gateway. GitHub-hosted models in the same model picker are not traced this way. The Copilot CLI also can't send custom headers to a BYOK provider, so attribute teams with key metadata instead of request headers.
Which path to choose
| Situation | Use |
|---|---|
| Developers use GitHub-hosted models | OpenTelemetry export |
| You want visibility without changing how Copilot calls models | OpenTelemetry export |
| Your organization pays for models through its own provider key | AI Gateway |
| You need one place that holds the provider key and records every call | AI Gateway |
Both paths can send data to the same Langfuse project, but Copilot's OpenTelemetry export also records BYOK model calls. Before combining them, filter out the OpenTelemetry model-call spans that the gateway also records. Otherwise, tokens and cost are counted twice. If you can't filter those spans, choose one tracing path for BYOK calls.
What to look at first
- Tokens per developer per week, to see adoption and outliers.
- Tokens per session, to find long sessions worth reading.
- Model mix, to see which models developers pick in the model picker.
- Tool failures, to find tasks where the agent struggles.
To compare Copilot with Claude Code, Codex, and Cursor on one dashboard, see coding agent cost tracking.
FAQ
Can I see GitHub Copilot usage per user?
GitHub's billing and admin views show usage per seat. For per-session detail, such as tokens per task and the tool calls the agent made, export Copilot's OpenTelemetry traces to Langfuse, where each session is attributed to its user.
Does Langfuse show my GitHub AI credit consumption?
No. Langfuse records tokens and computes cost from model prices. AI credit consumption is GitHub's billing measure and stays in GitHub. Use Langfuse to compare sessions, developers, and models, and GitHub billing for your invoice.
Who bills BYOK models used in Copilot?
The model provider. GitHub states that BYOK usage is billed directly by your chosen provider and doesn't count against Copilot request quotas. Routing BYOK models through the Langfuse AI Gateway doesn't change that: the gateway forwards requests with your organization's provider connection.