Skip to main content

Documentation Index

Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Trace GitHub Copilot sessions in VS Code and the Copilot CLI in Arize AX for full observability.
GitHub Copilot is GitHub’s AI pair programmer for VS Code and the command line. The Arize Agent Kit instruments both Copilot surfaces and exports OpenInference spans to Arize AX or Phoenix. VS Code uses per-event hook files; the CLI uses a single hooks.json.

Launch Arize

To get started, sign up for a free Arize account and get your Space ID and API Key:
  1. Log in at app.arize.com
  2. Click Settings and copy the Space ID
  3. Open the API Keys tab and create or copy an API key

Install

Copilot hooks are installed at the project level under .github/hooks/. Run the installer from the root of each repository where you want tracing.

Curl installer

macOS / Linux:
cd /path/to/your/project
curl -sSL https://raw.githubusercontent.com/Arize-ai/arize-agent-kit/main/install.sh | bash -s -- copilot
Windows (PowerShell):
cd C:\path\to\your\project
iwr -useb https://raw.githubusercontent.com/Arize-ai/arize-agent-kit/main/install.bat -OutFile $env:TEMP\install.bat
& $env:TEMP\install.bat copilot

Local clone

git clone https://github.com/Arize-ai/arize-agent-kit.git
cd /path/to/your/project
/path/to/arize-agent-kit/install.sh copilot         # macOS / Linux
\path\to\arize-agent-kit\install.bat copilot        # Windows
The installer prompts for your backend (Phoenix or Arize AX) and project name, writes credentials to ~/.arize/harness/config.yaml, and registers VS Code (.github/hooks/*.json) and Copilot CLI (.github/hooks/hooks.json) hooks in the current project.

Configuration

Credentials live in ~/.arize/harness/config.yaml and apply across all projects. Per-project environment variables override config.yaml and can be set in your shell profile.

Phoenix (self-hosted)

export PHOENIX_ENDPOINT="http://localhost:6006"
export ARIZE_PROJECT_NAME="copilot"
export ARIZE_TRACE_ENABLED="true"

Arize AX (cloud)

export ARIZE_API_KEY="<your-api-key>"
export ARIZE_SPACE_ID="<your-space-id>"
export ARIZE_PROJECT_NAME="copilot"
export ARIZE_TRACE_ENABLED="true"

Redaction controls

Each ARIZE_LOG_* flag accepts "true" or "false" and defaults to "true". Set to "false" to opt out per category:
export ARIZE_LOG_PROMPTS="false"
export ARIZE_LOG_TOOL_DETAILS="false"
export ARIZE_LOG_TOOL_CONTENT="false"
FlagRedacts
ARIZE_LOG_PROMPTSUser prompt and assistant response text
ARIZE_LOG_TOOL_DETAILSTool names and arguments
ARIZE_LOG_TOOL_CONTENTTool call output content

Observe

Once tracing is enabled, Copilot activity from both VS Code and the CLI streams to Arize. You’ll see:
  • Turn traces — each prompt → response cycle as a parent span
  • Tool spans — nested spans for each tool call with inputs, outputs, and duration
  • Subagent spans — activity from any subagents Copilot spawns (VS Code)
  • Error spanserrorOccurred events from the CLI
  • Session grouping — all turns from the same session grouped by session_id

Hooks Captured

Copilot in VS Code and on the CLI use different event names. The Agent Kit handles both with one install command.
SurfaceHook FileEvents
VS Code.github/hooks/session-start.jsonSessionStart
VS Code.github/hooks/user-prompt.jsonUserPromptSubmit
VS Code.github/hooks/pre-tool.jsonPreToolUse
VS Code.github/hooks/post-tool.jsonPostToolUse
VS Code.github/hooks/stop.jsonStop
VS Code.github/hooks/subagent-stop.jsonSubagentStop
CLI.github/hooks/hooks.jsonsessionStart, userPromptSubmitted, preToolUse, postToolUse, errorOccurred, sessionEnd

Reference

For the full list of environment variables, default file paths, and troubleshooting steps, see the Copilot tracing README.

Uninstall

Run from the project root where you installed the hooks:
curl -sSL https://raw.githubusercontent.com/Arize-ai/arize-agent-kit/main/install.sh | bash -s -- uninstall copilot

Resources