Skip to content

Commit

Permalink
fix missing call to extractMetricUsage from Grafana dashboard
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Oct 25, 2024
1 parent 44c6abc commit 47715cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/grafana/grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ func (c *grafanaCollector) Execute(ctx context.Context, _ context.CancelFunc) er

metricUsage := make(map[string]*modelAPIV1.MetricUsage)
for _, h := range hits {
_, getErr := c.getDashboard(h.UID)
dashboard, getErr := c.getDashboard(h.UID)
if getErr != nil {
logrus.WithError(getErr).Errorf("failed to get dashboard %q with UID %q", h.Title, h.UID)
continue
}
c.extractMetricUsage(metricUsage, dashboard)
}
if len(metricUsage) > 0 {
c.db.EnqueueUsage(metricUsage)
Expand Down

0 comments on commit 47715cb

Please sign in to comment.