#### Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [ ] Each component has a single commit (if not, squash them into one commit) - [ ] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description I use dialog module and want to export current active calls with custom labels. I need to decrement the counter value when a call is terminated. `prom_counter_dec` add this functionality.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2858
-- Commit Summary --
* xhttp_prom: introduced prom_counter_update * xhttp_prom: replaced prom_counter_inc by prom_counter_update * xhttp_prom: added prom_counter_dec function * xhttp_prom: added rpc_prom_counter_dec * xhttp_prom: counter_dec published via KEMI interface * xhttp_prom: docbook - fixed 'Document root element "chapter", must match DOCTYPE root "book".' * xhttp_prom: docubook ulink elementdo not alloed inside listitem element * xhttp_prom: docbook para element not allowed inside another para element * xhttp_prom: docbook files space formating * xhttp_prom: added prom_counter_dec docbook description
-- File Changes --
M src/modules/xhttp_prom/doc/xhttp_prom_admin.xml (1151) M src/modules/xhttp_prom/prom_metric.c (29) M src/modules/xhttp_prom/prom_metric.h (4) M src/modules/xhttp_prom/xhttp_prom.c (324) M src/modules/xhttp_prom/xhttp_prom.h (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2858.patch https://github.com/kamailio/kamailio/pull/2858.diff
Hello Serguey,
according to specifications https://prometheus.io/docs/concepts/metric_types/ counters should not decrease, if needed to decrease it recommends to use gauges instead. So what is the point of adding a forbidden feature?
Closed #2858.
Thanks @vhernando Closing PR as useless.