Skip to content

[Feature] Deploy Grafana Dashboards for Microservice Metrics #119

Description

@NotYuSheng

Description

Create and deploy Grafana dashboards for each microservice using Helm-managed ConfigMaps or sidecar importers. Each dashboard should visualize HTTP request metrics (e.g., request count, latency, errors) exposed via Prometheus /metrics.


User Story

As a developer or operator, I want to automatically provision Grafana dashboards for each service via Helm so that I can monitor service behavior in real-time without manual dashboard setup.


Acceptance Criteria

  1. Given a microservice with Prometheus metrics exposed, when its Helm chart is installed or upgraded, then a Grafana dashboard is automatically deployed or made available for import.
  2. If metrics are not yet available (e.g., endpoint not scraped), then the panels should remain empty without causing dashboard load errors.

Notes

  • Preferred deployment pattern:

    • Use a Grafana sidecar to auto-import dashboard JSONs from a mounted ConfigMap.
    • Store dashboard definitions in a dashboards/ folder in the Helm chart and template them into a ConfigMap.
  • Example ConfigMap template:

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "your-service.fullname" . }}-dashboard
  labels:
    grafana_dashboard: "1"
data:
  {{ (.Files.Glob "dashboards/*.json").AsConfig | indent 2 }}
  • Grafana must be configured to use sidecar.dashboards.enabled=true via its Helm chart:

    sidecar:
      dashboards:
        enabled: true
        label: grafana_dashboard
  • Dashboard panels should visualize:

    • HTTP request rate (http_requests_total)
    • Request latency (http_request_latency_seconds)
    • 4xx/5xx response trends
    • Custom events (if any, like table detections, translations, etc.)
  • Optional: Include a values.yaml flag like monitoring.grafanaDashboards.enabled to make dashboard creation configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew user-facing functionality

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions