fluent / fluent/fluent-plugin-prometheus

Counter should start from 0

Open
#69 6 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
257
Forks
83
Avg merge
1d 16h
Merged PRs (30d)
7

Description

Current implementation is not following the below rule

https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics

```
To avoid this, export 0 (or NaN, if 0 would be misleading) for any time series you know may exist in advance.
```

This is leading to situation's such as creating prometheus alert.
For example
```
rate(my_metric[1m]) > 0
```
Will not fire alert when my_metric=1 but instead my_metric > 2.
This is because my_metric does not start with 0 and start's with 1

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.