Skip to content

metrics: fix stale multiprocess gauge values - #25827

Closed
nalves599 wants to merge 1 commit into
goauthentik:mainfrom
nalves599:nalves599/fix-stale-multiprocess-gauge-values
Closed

nalves599 wants to merge 1 commit into
goauthentik:mainfrom
nalves599:nalves599/fix-stale-multiprocess-gauge-values

Conversation

@nalves599

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Adds explicit Prometheus multiprocess modes for queue, worker, license, cache, outpost, and delayed-task gauges. It also resets stale license and worker-version values.

Why is this change needed?

The default gauge mode exports one value per Gunicorn worker, allowing stale values from workers that did not handle the latest metrics refresh. This caused incorrect queue depths and duplicate process series.

How was this tested?

Added tests for unlicensed metric resets and obsolete worker-version labels. Black, Ruff, and a standalone multiprocess aggregation regression check passed.

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

@nalves599
nalves599 requested a review from a team as a code owner September 7, 2026 09:45
@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit e3215aa
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a9e87ac951c440008c4d3fb
😎 Deploy Preview https://deploy-preview-25827--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit e3215aa
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a9e87acf6af650008e7330d
😎 Deploy Preview https://deploy-preview-25827--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit e3215aa
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a9e87acb297b800085c2178
😎 Deploy Preview https://deploy-preview-25827--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.54%. Comparing base (866c1e2) to head (e3215aa).
⚠️ Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25827      +/-   ##
==========================================
- Coverage   91.71%   91.54%   -0.18%     
==========================================
  Files        1154     1159       +5     
  Lines       73598    73843     +245     
  Branches     4054     4054              
==========================================
+ Hits        67503    67596      +93     
- Misses       6053     6205     +152     
  Partials       42       42              
Flag Coverage Δ
conformance 34.37% <0.00%> (+0.01%) ⬆️
e2e 38.58% <0.00%> (-0.43%) ⬇️
integration 30.55% <0.00%> (-0.41%) ⬇️
rust 42.92% <ø> (ø)
unit 93.20% <100.00%> (-0.07%) ⬇️
unit-migrate 93.22% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@BeryJu

BeryJu commented Sep 8, 2026

Copy link
Copy Markdown
Member

closing for #25882

@BeryJu BeryJu closed this Sep 8, 2026
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