Permalink
Browse files

Improve observability on metric creation - fixing issue introduced in…

… the previous commit
  • Loading branch information...
adriengentil committed Oct 11, 2018
1 parent 1832186 commit 9436a0a6b3f812e530f89ba48718f29ff86ce96a
Showing with 8 additions and 5 deletions.
  1. +1 −4 CHANGELOG.md
  2. +7 −1 biggraphite/plugins/carbon.py
@@ -6,9 +6,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Breaking changes
- the previous metric `bg_creates` becomes `bg_creates_enqueued` for Cassandra driver
### Improved
- improved observability on metric creation
@@ -34,7 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.13.10] - 2018-10-08
### Improved
- cassandra accessor observability: add metrics on query usage
- cassandra accessor observability: add metrics on query usage
## [0.13.9] - 2018-08-28
@@ -56,6 +56,10 @@
"bg_exists_latency_seconds", "create latency in seconds"
)
CREATES = prometheus_client.Counter(
"bg_creates", "metric creations"
)
CREATES_ENQUEUED = prometheus_client.Counter(
"bg_creates_enqueued", "metrics scheduled for creation"
)
@@ -305,6 +309,8 @@ def _createOneMetric(self):
except queue.Empty:
return
CREATES_DEQUEUED.inc()
existing_metric = self.accessor.get_metric(metric.name)
if metric == existing_metric:
@@ -322,7 +328,7 @@ def _createOneMetric(self):
self.cache.create_metric(metric)
self.tag(metric_name)
CREATES_DEQUEUED.inc()
CREATES.inc()
class MultiDatabase(database.TimeSeriesDatabase):

0 comments on commit 9436a0a

Please sign in to comment.