This file only calls out major changes. Please see the list of Git commits for the full list of changes.
- Accept an optional
error_metric_labelsmap inmetric_data()andcollect()to label the built-in error metric on output. Errors are still counted under the bare name; an invalid map is logged, counted as an error, and the bare metric is output (#30).
- Update a metric's pending increment in place instead of allocating a new
entry on every
incr()beforesync(), which removes the per-call allocation for counters and histogram observations (#28).
- Reuse expired index slots while their dictionary nodes still exist, avoid
expiry-driven broadcasts, renew known slots without synchronizing the full
index, and detect a re-created
key_count(#25). - Stagger worker cleanup timers, skip slots whose deadlines have not passed, yield between groups of TTL checks, and log a cleanup timer that fails to start (#23).
- Reclaim expired entries once per
remove_expired_keys_intervalfor the whole dictionary instead of once per worker, and not at all while no metric has anexptime(#23). - Add the
auto_flush_expiredoption to leave reclamation to the caller, and turn the cleanup off with aremove_expired_keys_intervalof 0 or less (#23).
Starting with this release, this fork (nginx-lua-prometheus-api7) uses
semantic versioning. Earlier releases used the upstream date-based scheme
(0.YYYYMMDD); as upstream is dormant and this fork is now maintained
independently, versions no longer track upstream snapshots. Date-based tags
before 1.0.0 are kept as-is.
- Reclaim expired shared-dict entries in
remove_expired_keys()so per-worker metric key dictionaries no longer step down until the dict fills up (#18).
Improved checking of label values.
- Added escaping of newline characters in label values (#145).
- Improved detection of LRU evictions (#147, #148).
- Per-worker metric name lookup tables now have a bounded size aimed at preventing memory leaking in environments with high metric churn (#151).
Performance optimization aimed at decreasing impact that metric collection has on other requests (#139).
Performance optimization of metric collection (#131).
Bucket label values no longer have leading and trailing zeroes (#119).
Histogram metrics can now be reset (#112).
Allow utf8 label values (#110).
- Scalability improvements that allow tracking a larger number of metrics without impacting nginx performance (#82).
- Simplified library initialization, moving all of it to
init_worker_by_lua_block. - Error metric name is now configurable (#91).
This is a significant release that includes counter performance improvements.
BREAKING CHANGE: this release requires additional per-worker initialization
in the init_worker_by_lua_block section of nginx configuration.
- Added support for incrementing and decrementing gauges (#52).
- Added del and reset for gauge and counter metrics (#56).
- Added per-worker lua counters that allow incrementing counter metrics without locking the dictionary (#75).
Added stream module support (#42).
Improved performance of metric collection (#25).
Initial version of the library.