prometheus / prometheus/client_js
Best way to do total count in case of counter reset ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.5k
- Forks
- 429
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 22
Description
I am using prometheus + grafana, and wrote a simple query like sum(increase(some_count[$__range])) , although this takes the difference between the first and last values, seeing prometheus values gets restart on restart of our node server, any better approach to tackle this problem ? Sample graph explaining the drop due to server restart

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, or entry point is identified. Start by reviewing the Prometheus query sum(increase(some_count[$__range])) and the counter-reset behavior described in the issue; clarify whether the client or the query is expected to change, then define a reproducible restart case and an observable expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grafana, javascript, nodejs, prometheus
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100