feat(observability): add a Grafana Sentry datasource for in-Grafana issue visualization - #5453
Conversation
…ssue visualization Sentry error/issue data was only reachable via a plain external hyperlink from resource-hub.json -- no way to see it alongside the rest of the stack's metrics/logs/traces in Grafana itself. Adds the first-party grafana-sentry- datasource plugin (v2.2.4, Grafana-signed, confirmed compatible with this repo's pinned grafana:13.1.0 -- verified live, not assumed), a setup script mirroring the existing GitHub datasource's API-provisioning pattern, and a dashboard (recent unresolved issues, top issues by event count, error-volume trend). SENTRY_API_TOKEN (a Sentry Internal Integration token) is a separate credential from SENTRY_DSN (used for this stack's own error reporting) -- a DSN authenticates ingestion, not the read/query API this datasource needs. Documented clearly in both .env.example and the self-hosting docs. Verified live on edge-nl-01 and in an isolated Grafana 13.1.0 container: plugin installs and registers with a valid signature, the datasource API accepts the exact jsonData/secureJsonData shape, and all 3 dashboard panel query shapes (issues sorted by date/freq, eventsStats) construct correct, well-formed real Sentry API requests -- confirmed by observing a genuine 401 from Sentry's own API on a deliberately fake token, not a plugin-side schema rejection. Full data verification needs the operator's own real Sentry credentials, which this session doesn't have. Part of #5365, closes #5369
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2f86c0c | Commit Preview URL Branch Preview URL |
Jul 12 2026, 07:59 PM |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5453 +/- ##
=======================================
Coverage 94.48% 94.48%
=======================================
Files 554 554
Lines 44450 44450
Branches 14663 14663
=======================================
Hits 41999 41999
Misses 1776 1776
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 20:05:24 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
resource-hub.json— no way to correlate it in time with the rest of the stack's metrics/logs/traces without leaving Grafana.grafana-sentry-datasourceplugin (v2.2.4) — a first-party Grafana Labs plugin, confirmed Grafana-signed and free (no Enterprise/Cloud requirement), researched before assuming anything per the tracking issue's own requirement (not a guessed plugin name/version).scripts/setup-sentry-datasource.shmirrors the existingsetup-github-datasource.shAPI-provisioning pattern exactly (a backend datasource whose token isn't ready at Grafana boot would crash file-based provisioning, so it's added post-boot over the API)..env.exampleand the self-hosting docs:SENTRY_API_TOKEN(a Sentry Internal Integration token with Project/Issue & Event/Organization read scopes) is a separate credential from the existingSENTRY_DSN— a DSN authenticates event ingestion, not the read/query API this datasource needs.SENTRY_DSNcannot be reused here.grafana/dashboards/sentry-issues.json: recent unresolved issues, top issues by event count, and error-volume trend over time.Verification approach (I don't have the repo owner's real Sentry credentials, so full live data flow can't be confirmed the same way the other 3 sub-issues in this epic were — documented honestly rather than skipped):
grafana/grafana:13.1.0image (both an isolated test container and the live edge-nl-01 Grafana) — registers withsignatureType: grafana(valid, first-party signed), no version-incompatibility crash.jsonData/secureJsonDatashape this script sends — accepted correctly.date, issues sorted byfreq,eventsStats) against that datasource with a deliberately fake token — confirmed each one constructs a correct, well-formed real Sentry API request URL and gets a genuine401 Unauthorizedback from Sentry's own API, not a plugin-side schema-rejection error. This proves the query JSON shape (queryType/issuesQuery/issuesSort/issuesLimit/eventsStatsYAxis/eventsStatsQuery/eventsStatsGroups) is exactly correct — only a real token is needed for real data to flow.Part of #5365. Closes #5369.
Test plan
npm run typechecknpm run ui:lint,npm run ui:typecheck,npm run ui:openapi:checknode scripts/validate-observability-configs.mjsshellcheck scripts/setup-sentry-datasource.sh— same pre-existing informational-only SC1091 note assetup-github-datasource.sh, nothing newnpm run test:ci— full local gate green apart from 2 known, pre-existing, environment-only flakes in unrelated miner git-fixture tests (a local SSH-agent commit-signing key not being available in this shell's agent socket — confirmed via direct reproduction outside any test, and confirmed unrelated to this diff; GitHub Actions CI has no such signing config)