Skip to content

Commit

Permalink
fix: panic if no volumes have analytics enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss authored and cgrinds committed Nov 25, 2024
1 parent db58b0b commit f19df84
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,23 @@ func (t *TopMetrics) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, *

metricsData, err := t.processTopMetrics(data)
if err != nil {
return nil, nil, err
return nil, t.client.Metadata, err
}

if metricsData == nil {
return nil, t.client.Metadata, nil
}

if t.clientMetricsEnabled {
err = t.processTopClients(metricsData)
if err != nil {
return nil, nil, err
return nil, t.client.Metadata, err
}
}
if t.fileMetricsEnabled {
err = t.processTopFiles(metricsData)
if err != nil {
return nil, nil, err
return nil, t.client.Metadata, err
}
}

Expand Down

0 comments on commit f19df84

Please sign in to comment.