fix: use less expensive prometheus labels#3572
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
📝 WalkthroughWalkthroughThe changes simplify the Prometheus metric for key verifications by reducing its label set from five to two: "type" (indicating "root_key" or "key") and "code" (the key's status). The code and documentation are updated to reflect this new labeling scheme, removing references to workspace, API, key IDs, and validity booleans. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant KeyVerifier
participant Prometheus
Client->>KeyVerifier: Verify(key)
KeyVerifier->>Prometheus: Increment KeyVerificationsTotal(type, code)
KeyVerifier-->>Client: Return verification result
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)go/internal/services/keys/verifier.go (1)⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
Graphite Automations"Post a GIF when PR approved" took an action on this PR • (07/15/25)1 gif was posted to this PR based on Andreas Thomas's automation. |

This replaces the high-cardinality labels with just a key_type and outcome
Summary by CodeRabbit