Skip to content

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

Merged
hubcio merged 4 commits into
masterfrom
feat/server-ng-pat-metrics
Aug 3, 2026
Merged

feat(server-ng): enforce PAT limits and expose Prometheus metrics#3773
hubcio merged 4 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 33.71%. Comparing base (1453114) to head (a17b280).

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.72%   33.71%   -42.02%     
  Complexity      969      969               
=============================================
  Files          1322     1321        -1     
  Lines        159363   140595    -18768     
  Branches     132746   114055    -18691     
=============================================
- Hits         120684    47398    -73286     
- Misses        35041    91895    +56854     
+ Partials       3638     1302     -2336     
Components Coverage Δ
Rust Core 23.23% <57.46%> (-52.46%) ⬇️
Java SDK 62.71% <ø> (ø)
C# SDK 71.16% <ø> (-1.14%) ⬇️
Python SDK 93.10% <ø> (ø)
PHP SDK 84.52% <ø> (ø)
Node SDK 95.30% <ø> (+0.07%) ⬆️
Go SDK 43.08% <ø> (ø)
Files with missing lines Coverage Δ
core/metadata/src/stm/user.rs 88.04% <100.00%> (+0.33%) ⬆️
core/server-ng/src/http/state.rs 0.00% <ø> (ø)
core/simulator/src/replica.rs 96.47% <100.00%> (+0.02%) ⬆️
core/server-ng/src/pat.rs 85.33% <94.00%> (+85.33%) ⬆️
core/server-ng/src/bootstrap.rs 24.88% <14.28%> (-0.04%) ⬇️
core/server-ng/src/http/submit.rs 0.00% <0.00%> (ø)
core/server-ng/src/dispatch.rs 39.81% <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 724 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.

@hubcio
hubcio merged commit 71c67e4 into master Aug 3, 2026
98 checks passed
@hubcio
hubcio deleted the feat/server-ng-pat-metrics branch August 3, 2026 06:33
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Aug 3, 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.

3 participants