grafana/apps/dashvalidator/pkg/cache
Alexa Vargas 808cf7e4f1
SuggestedDashboards: dashvalidator app - Add Prometheus Support (#115769)
Dashboard Validator App - Prometheus support

Validates dashboard compatibility with Prometheus datasources. The app analyzes dashboard queries against                             available metrics to produce a compatibility score.                                              

Backend (Go):
- App scaffolding with grafana-app-sdk, custom `/check` endpoint
- Prometheus validator: parses PromQL queries, fetches available metrics, and computes per-query and per-datasource compatibility
- Metric caching, input validation, request timeouts, and structured error handling (not found, unreachable, auth, timeout)
- Custom authorizer with role-based access control
- Datasource-scoped validation and variable interpolation support

Frontend (React/TypeScript):
- API client for the validator backend
- Compatibility badge inline on community dashboards
- Detail modal showing per-datasource and per-query results
- Gated behind dashboardValidatorApp feature flag

Tests:
- Go unit tests for parser, fetcher, validator, and JSON serialization
- Dashboard query extraction tests
2026-02-16 20:06:35 +01:00
..
cache.go
cache_test.go
provider.go