Skip to content

Commit bbce3f4

Browse files
author
Timo Reimann
authored
Merge pull request #362 from digitalocean/actually-increment-counter-metrics
Fix broken firewall counter metrics by incrementing
2 parents a0c87dd + 28c5280 commit bbce3f4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGELOG
22

3+
* Fix broken firewall counter metrics by incrementing (@timoreimann)
4+
35
## v0.1.30 (beta) - October 31th 2020
46

57
* Support LB custom size slug (@anitgandhi)

cloud-controller-manager/do/firewall_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ func (fm *firewallManager) executeInstrumentedFirewallOperation(ctx context.Cont
379379
}))
380380
defer func() {
381381
timer.ObserveDuration()
382-
fm.metrics.apiOperationsTotal.With(promLabels)
382+
fm.metrics.apiOperationsTotal.With(promLabels).Inc()
383383
}()
384384

385385
fw, resp, err := f(ctx)
@@ -439,7 +439,7 @@ func (fc *FirewallController) ensureReconciledFirewallInstrumented(ctx context.C
439439
}))
440440
defer func() {
441441
t.ObserveDuration()
442-
fc.fwManager.metrics.reconcilesTotal.With(labels)
442+
fc.fwManager.metrics.reconcilesTotal.With(labels).Inc()
443443
}()
444444

445445
skipped, err := fc.ensureReconciledFirewall(ctx)
@@ -466,7 +466,7 @@ func (fc *FirewallController) syncResource(ctx context.Context) error {
466466
}))
467467
defer func() {
468468
t.ObserveDuration()
469-
fc.fwManager.metrics.resourceSyncsTotal.With(labels)
469+
fc.fwManager.metrics.resourceSyncsTotal.With(labels).Inc()
470470
}()
471471

472472
// Ignore Get() result since we only care about the cache getting updated.

0 commit comments

Comments
 (0)