Add repository and source context to skill metrics#165
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
prob better way to do context but idc to figure it out right now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
deploymentContextmodule-level variable to track the Sentry initialization context (cli or action)SkillMetricsContextinterface to allow passing additional context when emitting skill metricsemitSkillMetrics()function signature to accept optional context parameterrepository: Full repository name (owner/repo format) when availablesource: Deployment context (cli or action) from initializationImplementation Details
deploymentContextis captured during Sentry initialization and reused for all subsequent metric emissionsskill.duration,tokens.input,tokens.output,cost.usd,findings.total, andfindingshttps://claude.ai/code/session_01TcAbGVYiyoCMNC7PYrJ1kS