-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Describe the feature or problem you'd like to solve
Implement telemetry endpoint support in GitHub Copilot CLI, following Claude's philosophy
Proposed solution
Overview
Implement telemetry endpoint support in GitHub Copilot CLI, following Claude's philosophy of:
- User Control: Opt-in telemetry with clear transparency
- Privacy-First: Minimal data collection, user can customize what's sent
- Open Standards: Support for custom telemetry backends (not vendor-locked)
- Developer Experience: Simple configuration, no friction
Claude's Telemetry Philosophy
Claude supports telemetry through:
- Configurable Endpoints: Users can specify custom telemetry URLs
- Structured Metrics: Well-defined metrics for request/response tracking
- User Session Tracking: Session IDs for correlating related requests
- Cost Attribution: Track token usage and costs per session/user
- Opt-In by Default: Users explicitly enable telemetry
- No Automatic Sending: Telemetry happens only when configured
- Custom Handlers: Ability to intercept and customize what gets sent
Proposed Implementation for Copilot CLI
Configuration
/telemetry # Configure telemetry
/telemetry --endpoint <url> # Set custom telemetry endpoint
/telemetry --enable/--disable # Toggle telemetry
/telemetry --list-metrics # Show what would be sentEnvironment Variables
COPILOT_TELEMETRY_ENDPOINT=https://your-service.com/events
COPILOT_TELEMETRY_ENABLED=true
COPILOT_TELEMETRY_API_KEY=... # Optional auth
Metrics to Support
- Session metrics: session_id, start_time, duration, status
- Request metrics: model, prompt_tokens, completion_tokens, latency
- Tool usage: tools_used, success_rate, errors
- User context: org_id, user_id (optional, user-controlled)
Cost Metrics
- input_cost (based on tokens × model pricing)
- output_cost (based on tokens × model pricing)
- total_request_cost
- cumulative_session_cost
- cumulative_monthly_cost
- cost_per_user, cost_per_org
- model_cost_breakdown (cost distribution by model used)
Privacy Features
- Local-only option: store metrics locally without sending
- Data minimization: configurable metric collection level (minimal/standard/detailed)
- User anonymization: hash user IDs by default
- No automatic personal data: require explicit opt-in for PII
Benefits
- Enterprise monitoring and cost tracking
- Usage analytics for teams
- Performance insights
- Compliance with data policies
- Custom integration with existing observability platforms
Examples of Integration
- Send to DataDog, New Relic, Splunk via custom endpoints
- Local event log for audit trails
- Custom metrics processor for cost allocation
Example prompts or workflows
No response
Additional context
No response
Reactions are currently unavailable