Repository navigation
Conversation
…rics from workers, index the in-flight count (#398) Part of #398 (items 1, 3 and 4; item 2 was fixed in #475). - Series cap: orbit_http_requests_total and the request-duration histogram are keyed by route template, so the shared 200-series cap was reachable in normal use and new series (a route's first 5xx) were dropped. The two HTTP families now cap at 8192, enough for every route template x 8 method labels x 5 status classes; routes_fit_the_http_series_cap parses routes.rs, checks the bound and records every combination with orbit_metrics_dropped_series_total staying 0. Other families keep 200. - Helm: worker pods may reach the API port, so with networkPolicy.enabled an unauthenticated /metrics there exposed installation-wide gauges such as orbit_license_usage to agent code. The chart now refuses that combination unless monitoring.port or monitoring.token is set, or monitoring.allowWorkersOnApiPort=true accepts it. values-prod.example.yaml sets monitoring.port: 9090 (outside worker egress). CI asserts the refusal, the dedicated listener and that the worker NetworkPolicy omits the port. - Index: the in-flight count used status = ANY($1), which no partial index could serve, so it read the whole (org_id, status) index. Migration 0066 adds executions_in_flight_status_idx and the query names the same literal statuses (a unit test keeps the constant, the query and the migration in step; an integration test checks the plan). On 1M rows: 803 buffers / 4.8 ms before, 4 buffers / 0.3 ms after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #398 (items 1, 3 and 4; item 2 was fixed in #475).
Summary
Part of #398 (items 1, 3 and 4; item 2 was fixed in #475).
are keyed by route template, so the shared 200-series cap was reachable in
normal use and new series (a route's first 5xx) were dropped. The two HTTP
families now cap at 8192, enough for every route template x 8 method labels
x 5 status classes; routes_fit_the_http_series_cap parses routes.rs, checks
the bound and records every combination with orbit_metrics_dropped_series_total
staying 0. Other families keep 200.
unauthenticated /metrics there exposed installation-wide gauges such as
orbit_license_usage to agent code. The chart now refuses that combination
unless monitoring.port or monitoring.token is set, or
monitoring.allowWorkersOnApiPort=true accepts it. values-prod.example.yaml
sets monitoring.port: 9090 (outside worker egress). CI asserts the refusal,
the dedicated listener and that the worker NetworkPolicy omits the port.
could serve, so it read the whole (org_id, status) index. Migration 0066
adds executions_in_flight_status_idx and the query names the same literal
statuses (a unit test keeps the constant, the query and the migration in
step; an integration test checks the plan). On 1M rows: 803 buffers /
4.8 ms before, 4 buffers / 0.3 ms after.
Testing
cargo fmt --check,clippy -D warnings: cleancargo test --workspaceon a fresh database: 764 passed, 0 failedroutes_fit_the_http_series_cap(all 5,040 route × method × status combinations, no dropped series); migration/query/constant consistency unit test; query-plan integration testhelm lint; five render variants, including the new refusal and the prod example (API port 8080 allowed for workers, 9090 not)executions_status_idx, 803 buffers, 4.8 ms; afterexecutions_in_flight_status_idx, 4 buffers, 0.3 mspnpm docs:check: passedUpgrade note: with
networkPolicy.enabledand the defaultmonitoring.port: 0, the chart now refuses to render untilmonitoring.port,monitoring.token.existingSecretormonitoring.allowWorkersOnApiPort=trueis set (seechangelog.d/398.changed.md). Migration0066; #447 uses0065.🤖 Generated with Claude Code