Skip to content

fix(prometheus): surface LRU eviction on gauge incr - #15048

Open
Bappaditya-kuilya wants to merge 1 commit into
Kong:masterfrom
Bappaditya-kuilya:fix/15041-prometheus-lru-eviction-flag
Open

Bappaditya-kuilya wants to merge 1 commit into
Kong:masterfrom
Bappaditya-kuilya:fix/15041-prometheus-lru-eviction-flag

Conversation

@Bappaditya-kuilya

Copy link
Copy Markdown

Fixes #15041 (partial: local incr paths).

Ports upstream forcible check (knyar/nginx-lua-prometheus#147) into Kong-owned inc_gauge: captures dict:incr forcible flag and logs via error metric instead of silently resetting on eviction.

Scope: gauges fixed. Counter flush inside external lua-resty-counter 0.2.1 still needs its own upstream fix + rockspec bump (follow-up).

Verified: luajit syntax PASS, 1 file 9+/4-, no conflict with upstream prometheus/.

@CLAassistant

CLAassistant commented Oct 13, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Bappaditya-kuilya seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Port upstream forcible check (knyar/nginx-lua-prometheus#147).
inc_gauge now captures dict:incr forcible flag and logs via
error metric instead of silently resetting on eviction.

Fixes Kong#15041 (partial: local incr paths; external
lua-resty-counter sync needs separate upstream fix + rockspec bump).
@Bappaditya-kuilya
Bappaditya-kuilya force-pushed the fix/15041-prometheus-lru-eviction-flag branch from 4321581 to 198db0f Compare October 13, 2026 16:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prometheus: lua-resty-counter drops LRU eviction flag, counters reset silently

2 participants