Skip to content

Commit

Permalink
fix: maps caching prometheus gauges weren't really used
Browse files Browse the repository at this point in the history
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
  • Loading branch information
Milan Lenco committed Oct 12, 2020
1 parent 0ead9d2 commit de585f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/telemetry/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ func (p *Plugin) updatePrometheus(ctx context.Context) {
itemName: item.Name,
metrics: map[string]prometheus.Gauge{},
}
p.runtimeStats[item.Name] = stats

// add gauges with corresponding labels into vectors
for k, vec := range p.runtimeGaugeVecs {
Expand Down Expand Up @@ -389,6 +390,7 @@ func (p *Plugin) updatePrometheus(ctx context.Context) {
itemIndex: item.Index,
metrics: map[string]prometheus.Gauge{},
}
p.buffersStats[item.Name] = stats

// add gauges with corresponding labels into vectors
for k, vec := range p.buffersGaugeVecs {
Expand Down Expand Up @@ -427,6 +429,7 @@ func (p *Plugin) updatePrometheus(ctx context.Context) {
threadID: thread.ID,
metrics: map[string]prometheus.Gauge{},
}
p.memoryStats[thread.Name] = stats

// add gauges with corresponding labels into vectors
for k, vec := range p.memoryGaugeVecs {
Expand Down Expand Up @@ -466,6 +469,7 @@ func (p *Plugin) updatePrometheus(ctx context.Context) {
itemName: item.Name,
metrics: map[string]prometheus.Gauge{},
}
p.nodeCounterStats[item.Name] = stats

// add gauges with corresponding labels into vectors
for k, vec := range p.nodeCounterGaugeVecs {
Expand Down Expand Up @@ -502,6 +506,7 @@ func (p *Plugin) updatePrometheus(ctx context.Context) {
name: item.InterfaceName,
metrics: map[string]prometheus.Gauge{},
}
p.ifCounterStats[item.InterfaceName] = stats

// add gauges with corresponding labels into vectors
for k, vec := range p.ifCounterGaugeVecs {
Expand Down

0 comments on commit de585f5

Please sign in to comment.