[5/6] Add a Grafana dashboard - #392
Merged
Merged
Conversation
This was referenced Oct 1, 2026
- Add GetEcosystemStats, aggregating packages, versions, artifacts, cache size, downloads and downloaded bytes per ecosystem - Publish six proxy_ecosystem_* gauges from it on the existing one-minute cache-stats tick - Set and selectively delete rather than Reset, so no scrape lands on a half-populated vector - Report artifacts with no package row under "unattributed" rather than dropping them, so the figures still add up Part 2 of 6 splitting git-pkgs#381 up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Ring of download size by ecosystem, cache figures, per-ecosystem table, vulnerability overview and a Runtime card - Add metrics.Gather so the page can render counters that were never in the database - Add proxy_response_bytes_total and response-writer byte counting - Serve a retained snapshot behind a staleness banner when the aggregation fails, rather than rendering old figures as current - Extract the security overview into a shared component Part 3 of 6 splitting git-pkgs#381 up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Add downloaded_bytes, downloads and an ecosystems array, served from the snapshot the gauges and the page already share - Add stats_unavailable so a failed aggregation is distinguishable from an idle proxy - Regenerate the OpenAPI spec Part 4 of 6 splitting git-pkgs#381 up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- 33 panels, no hardcoded data source UID - Three ecosystem variables, because the label means three different things across /metrics: the package record, the request path, and the handler's own name Part 5 of 6 splitting git-pkgs#381 up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wickedOne
force-pushed
the
analytics-5-grafana
branch
from
October 1, 2026 14:19
064166b to
36fe6ab
Compare
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.
Grafana dashboard
A ready-made dashboard at
deploy/grafana/git-pkgs-proxy.json, 33 panels across Overview, Download volume, Traffic and cache, Reliability, Storage and scanning, Cache composition and Bytes served. Import via Dashboards -> New -> Import and pick your Prometheus data source when prompted; there is no hardcoded data source UID.Three ecosystem variables
ecosystemmeans three different things across/metrics, and the dashboard says so rather than papering over it.Ecosystem filters the database-derived gauges, whose label comes from the package record and is normalized, so
gemreads asrubygems.Route filters
proxy_requests_total,proxy_request_duration_secondsandproxy_response_bytes_total, whose label comes from the request path. Mostly the same names, except the Debian route reportsdebianwhere the package record saysdeb, and non-package paths reportother.Upstream filters
proxy_upstream_fetch_duration_secondsandproxy_upstream_errors_total, whose label is the handler's own name:composer,gemandgowhere the other two saypackagist,rubygemsandgolang.#381 normalized that third set so it would join with the others. The review there asked for that to be its own PR, since renaming published series is a metric surface change that wants releasing and noting on its own; the decision is not to make it at all. So those two panels get their own variable instead. All three are query variables, so they populate from whatever labels your proxy is actually reporting.
Every
proxy_*metric the JSON queries was checked against the registry output; there are no dangling panels.