Skip to content

Add repository and source context to skill metrics#165

Merged
dcramer merged 1 commit intomainfrom
claude/add-findings-metric-uRg8S
Feb 18, 2026
Merged

Add repository and source context to skill metrics#165
dcramer merged 1 commit intomainfrom
claude/add-findings-metric-uRg8S

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 18, 2026

Summary

Enhanced telemetry collection for skill execution metrics by adding repository and deployment source context to all skill-related metrics emitted to Sentry.

Key Changes

  • Added deploymentContext module-level variable to track the Sentry initialization context (cli or action)
  • Introduced SkillMetricsContext interface to allow passing additional context when emitting skill metrics
  • Updated emitSkillMetrics() function signature to accept optional context parameter
  • Enhanced metric attributes to include:
    • repository: Full repository name (owner/repo format) when available
    • source: Deployment context (cli or action) from initialization
  • Updated all skill metric definitions in telemetry documentation to reflect new attributes
  • Modified skill task execution to pass repository information when emitting metrics

Implementation Details

  • The deploymentContext is captured during Sentry initialization and reused for all subsequent metric emissions
  • Repository context is passed from the task execution layer where it's available
  • All attributes are conditionally added only when present, maintaining backward compatibility
  • Metrics affected: skill.duration, tokens.input, tokens.output, cost.usd, findings.total, and findings

https://claude.ai/code/session_01TcAbGVYiyoCMNC7PYrJ1kS

Adds `repository` (full name e.g. "owner/repo") and `source` ("cli" or
"action") attributes to all Sentry metrics emitted by emitSkillMetrics.
This enables slicing findings, cost, and duration by repository and by
whether the run originated from a GitHub PR or the CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

https://claude.ai/code/session_01TcAbGVYiyoCMNC7PYrJ1kS
@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Feb 18, 2026 2:15am

Request Review

@dcramer
Copy link
Member Author

dcramer commented Feb 18, 2026

prob better way to do context but idc to figure it out right now

@dcramer dcramer merged commit 015b823 into main Feb 18, 2026
13 checks passed
@dcramer dcramer deleted the claude/add-findings-metric-uRg8S branch February 18, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments