Repository navigation
fix(observability): query the labels cbox-init actually emits - #30
Merged
Merged
Conversation
The process, scale and health metrics label the process as `name`; only the resource metrics use `process`. The dashboard, observability README and docs selected on `process=` (and `check_type` instead of `type`), so those panels and alerts matched nothing. Also drops panels and docs for metrics cbox-init never exported (cbox_init_process_cpu_seconds_total, cbox_init_scheduled_task_*), switches the CPU panel to cbox_init_process_cpu_percent, and documents the exported_instance rename under Prometheus' default honor_labels: false.
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.
The cbox-init dashboard and docs used labels and metrics that cbox-init doesn't emit, so the status, queue, health, CPU and scheduled-task panels showed nothing. This makes them match what cbox-init v3.7.0 actually exposes.
Labels
process_up,restarts_total,current_scale,desired_scaleandhealth_check_statuslabel the process asname, notprocess.type, notcheck_type.cpu_percent,memory_bytes, ...) useprocess.observability/README.mdalert rules,docs/observability/cbox-init-integration.mdanddocs/observability/health-checks.md.Metrics that don't exist
cbox_init_process_cpu_seconds_totalwas never a cbox-init metric. The CPU panel now usescbox_init_process_cpu_percent, with unitpercentinstead ofpercentunit.cbox_init_scheduled_task_*family was made up; cbox-init removed it from its own docs in August. The dashboard row, the alert rule and the doc sections are gone, and the docs now point to the schedule API.Also
CBOX_INIT_GLOBAL_RESOURCE_METRICS_ENABLED=true, because cbox-init ships with resource metrics off. I checked that this env var does turn them on.honor_labels: false, cbox-init'sinstancelabel is stored asexported_instance. The dashboard's Instance variable relies on this.observability/README.md.Checks: the dashboard JSON is still valid, and the env-contract, docs-versions and runtime-deps checks pass.
The label reference linked from the docs arrives with cboxdk/init#146.