Skip to content

Commit e1e4b5a

Browse files
Merge pull request #769 from cdong8812/fix-counter-metric-spike-using-statsD-handler
fix counter metric spike using statsD handler
2 parents 461caf2 + 80a966a commit e1e4b5a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/diamond/handler/stats_d.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ def _send(self):
132132
value = metric.raw_value
133133
if metric.path in self.old_values:
134134
value = value - self.old_values[metric.path]
135+
# provide an option for caller to manually set the value
136+
elif metric.value:
137+
value = metric.value
135138
self.old_values[metric.path] = metric.raw_value
136139

137140
if hasattr(statsd, 'StatsClient'):

0 commit comments

Comments
 (0)