Skip to content

fix/lazy load request metrics - #2120

Merged
alanpeixinho merged 1 commit into
kernelci:mainfrom
profusion:fix/lazy-load-request-metrics
Sep 16, 2026
Merged

alanpeixinho merged 1 commit into
kernelci:mainfrom
profusion:fix/lazy-load-request-metrics

Conversation

@alanpeixinho

Copy link
Copy Markdown
Contributor

What it is

Django admin system checks import every MIDDLEWARE class when management commands start. Request-analytics Counter() ran at import and opened files under PROMETHEUS_MULTIPROC_DIR, which crashed the
ingester if that directory was missing.
Lazily build those counters in a singleton.
Unit tests to ensure Prometheus Counter is lazy loaded.

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
@alanpeixinho
alanpeixinho added this pull request to the merge queue Sep 16, 2026
Merged via the queue into kernelci:main with commit 5ca3435 Sep 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants