Skip to content

Commit

Permalink
Merge pull request #8 from meshcloud/master
Browse files Browse the repository at this point in the history
Fix issue with per database metric not properly resetting
  • Loading branch information
marcinbudny authored Jan 11, 2024
2 parents e281174 + 05672a3 commit 83ebbdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (e *exporter) Collect(ch chan<- prometheus.Metric) {
}

func collectPerDatabaseGauge(stats *stats, vec *prometheus.GaugeVec, collectFunc func(*dbStats) []metricInfo, ch chan<- prometheus.Metric) {
vec.Reset()
for _, dbs := range stats.dbStats {
metricInfos := collectFunc(dbs)

Expand All @@ -165,6 +166,7 @@ func collectPerDatabaseGauge(stats *stats, vec *prometheus.GaugeVec, collectFunc
}

func collectPerDatabaseCounter(stats *stats, vec *prometheus.CounterVec, collectFunc func(*dbStats) []metricInfo, ch chan<- prometheus.Metric) {
vec.Reset()
for _, dbs := range stats.dbStats {
metricInfos := collectFunc(dbs)

Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ ravendb_working_set_bytes 1.651195904e+09

## Changelog

### 0.5.1

* Fixed issue with per database metric not properly resetting

### 0.5.0

* Added database gauge metric: `ravendb_database_tasks`
Expand Down

0 comments on commit 83ebbdd

Please sign in to comment.