Repository navigation
Conversation
sergical
force-pushed
the
feat/cli-games-leaderboard
branch
from
October 7, 2026 15:17
4ad0467 to
f775f5e
Compare
A finished Snake game sends one snake.score metric tagged only with a random player handle. It goes out in a new trace with the user cleared, and beforeSendMetric keeps only an attribute allowlist. Nothing is sent when telemetry is off. The sentry-mcp Worker serves GET /api/games/snake/leaderboard. It reads the top 10 scores of the last 30 days with a read-only token, caches the result in KV, rate-limits by hashed IP, and returns only generic errors. `sentry games leaderboard` validates every row again before it prints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sergical
force-pushed
the
feat/cli-games-leaderboard
branch
from
October 7, 2026 15:25
f775f5e to
49149a9
Compare
Score reporting runs from the game timer, so a database or transport error could crash sentry init. It now logs the error and skips the score. Handles had only 102,400 values, so two players were likely to share one after a few hundred players. Four-digit suffixes give about 10 million. An old two-digit handle is replaced the next time it is read. Co-authored-by: Claude <claude@anthropic.com>
This branch has not been deployed
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.
Adds
sentry games leaderboard, which shows the top 10 Snake scores from the last 30 days. Stacked on #1435.Scores (CLI)
snake.scoremetric to the CLI telemetry project. Its only custom attribute is a random handle such asbrave-otter-42, stored in the localmetadatatable.beforeSendMetrickeeps onlyhandle,sentry.release,sentry.environmentandsentry.sdk.*for this metric.SENTRY_CLI_NO_TELEMETRY,DO_NOT_TRACK, or the stored preference).Endpoint (
sentry-mcpWorker)GET /api/games/snake/leaderboardqueries thetracemetricsdataset formax(value)per handle, withvalue:<=10000.Setup before deploy
org:readscope only.npx wrangler secret put SENTRY_GAMES_READ_TOKENfrompackages/mcp-cloudflare.Known limit: the DSN is public, so anyone can submit a score. The handle format and the 10,000 cap block only impossible values.
Breaking Changes: None