Skip to content

feat(server-ng): enforce PAT limits and expose Prometheus metrics - #3773

Open
hubcio wants to merge 3 commits into
masterfrom
feat/server-ng-pat-metrics
Open

feat(server-ng): enforce PAT limits and expose Prometheus metrics#3773
hubcio wants to merge 3 commits into
masterfrom
feat/server-ng-pat-metrics

Conversation

@hubcio

@hubcio hubcio commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Enforce max_tokens_per_user at PAT create ingress on both planes and
add a real /metrics endpoint with legacy gauge parity. Binary-plane
PAT rewrite errors used to be dropped silently (the client hung until
timeout); they now return a typed deny. The segments gauge reports the
correct scrape-time count instead of reproducing the legacy drift
bug.

numinnex
numinnex previously approved these changes Jul 30, 2026
Enforce max_tokens_per_user at PAT create ingress on both planes and
add a real /metrics endpoint with legacy gauge parity. Binary-plane
PAT rewrite errors used to be dropped silently (the client hung until
timeout); they now return a typed deny. The segments gauge reports the
correct scrape-time count instead of reproducing the legacy drift
bug.
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.46606% with 188 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.81%. Comparing base (5ca0bbb) to head (ce707b2).

Files with missing lines Patch % Lines
core/server-ng/src/http.rs 0.00% 65 Missing ⚠️
core/server-ng/src/http/metrics.rs 67.50% 49 Missing and 3 partials ⚠️
core/server-ng/src/dispatch.rs 37.93% 36 Missing ⚠️
core/server-ng/src/http/submit.rs 0.00% 17 Missing ⚠️
core/server-ng/src/bootstrap.rs 14.28% 12 Missing ⚠️
core/server-ng/src/pat.rs 94.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3773       +/-   ##
=============================================
- Coverage     75.53%   32.81%   -42.72%     
  Complexity      969      969               
=============================================
  Files          1317     1316        -1     
  Lines        154895   137087    -17808     
  Branches     128519   110789    -17730     
=============================================
- Hits         117004    44990    -72014     
- Misses        34344    90845    +56501     
+ Partials       3547     1252     -2295     
Components Coverage Δ
Rust Core 21.93% <57.46%> (-53.58%) ⬇️
Java SDK 62.71% <ø> (ø)
C# SDK 71.14% <ø> (-1.13%) ⬇️
Python SDK 92.27% <ø> (ø)
PHP SDK 84.52% <ø> (ø)
Node SDK 95.31% <ø> (+0.18%) ⬆️
Go SDK 43.08% <ø> (ø)
Files with missing lines Coverage Δ
core/metadata/src/stm/user.rs 88.28% <100.00%> (+0.33%) ⬆️
core/server-ng/src/http/state.rs 0.00% <ø> (ø)
core/simulator/src/replica.rs 100.00% <100.00%> (ø)
core/server-ng/src/pat.rs 85.33% <94.00%> (+85.33%) ⬆️
core/server-ng/src/bootstrap.rs 21.18% <14.28%> (-0.02%) ⬇️
core/server-ng/src/http/submit.rs 0.00% <0.00%> (ø)
core/server-ng/src/dispatch.rs 39.90% <37.93%> (-0.02%) ⬇️
core/server-ng/src/http/metrics.rs 67.50% <67.50%> (ø)
core/server-ng/src/http.rs 44.38% <0.00%> (-2.96%) ⬇️

... and 723 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants