oh-my-agent-commandcode 0.0.0-stage → 20.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/filter-test-output.sh +52 -0
- package/mods/oma.ts +347 -0
- package/package.json +30 -4
- package/skills/_shared/conditional/experiment-ledger.md +28 -0
- package/skills/_shared/conditional/exploration-loop.md +22 -0
- package/skills/_shared/conditional/quality-score.md +33 -0
- package/skills/_shared/core/anti-ai-prose.md +191 -0
- package/skills/_shared/core/api-contracts/README.md +28 -0
- package/skills/_shared/core/api-contracts/template.md +90 -0
- package/skills/_shared/core/clarification-protocol.md +23 -0
- package/skills/_shared/core/code-intelligence.md +46 -0
- package/skills/_shared/core/collaboration-policy.md +28 -0
- package/skills/_shared/core/common-checklist.md +28 -0
- package/skills/_shared/core/context-budget.md +22 -0
- package/skills/_shared/core/context-loading.md +34 -0
- package/skills/_shared/core/difficulty-guide.md +26 -0
- package/skills/_shared/core/execution-policy.md +31 -0
- package/skills/_shared/core/lessons-learned.md +33 -0
- package/skills/_shared/core/prompt-structure.md +18 -0
- package/skills/_shared/core/quality-principles.md +11 -0
- package/skills/_shared/core/session-metrics.md +35 -0
- package/skills/_shared/core/skill-routing.md +39 -0
- package/skills/_shared/core/test-approach.md +54 -0
- package/skills/_shared/core/vendor-detection.md +52 -0
- package/skills/_shared/runtime/memory-protocol.md +118 -0
- package/skills/_shared/runtime/result-contract.md +64 -0
- package/skills/_shared/ui-interaction-quality.md +133 -0
- package/skills/oma-academic-writing/SKILL.md +181 -0
- package/skills/oma-academic-writing/resources/abstract-guide.md +51 -0
- package/skills/oma-academic-writing/resources/academic-verb-tiers.md +42 -0
- package/skills/oma-academic-writing/resources/anti-ai-checklist.md +52 -0
- package/skills/oma-academic-writing/resources/hedging-guide.md +132 -0
- package/skills/oma-academic-writing/resources/sentence-structure-reference.md +151 -0
- package/skills/oma-architecture/SKILL.md +203 -0
- package/skills/oma-architecture/resources/api-evolution.md +41 -0
- package/skills/oma-architecture/resources/checklist.md +42 -0
- package/skills/oma-architecture/resources/execution-protocol.md +115 -0
- package/skills/oma-architecture/resources/methodology-selection.md +92 -0
- package/skills/oma-architecture/resources/migration-patterns.md +28 -0
- package/skills/oma-architecture/resources/output-templates.md +111 -0
- package/skills/oma-architecture/resources/stakeholder-synthesis.md +80 -0
- package/skills/oma-backend/SKILL.md +202 -0
- package/skills/oma-backend/resources/checklist.md +45 -0
- package/skills/oma-backend/resources/error-playbook.md +97 -0
- package/skills/oma-backend/resources/execution-protocol.md +39 -0
- package/skills/oma-backend/resources/orm-reference.md +61 -0
- package/skills/oma-backend/variants/node/api-template.ts +315 -0
- package/skills/oma-backend/variants/node/snippets.md +475 -0
- package/skills/oma-backend/variants/node/stack.yaml +21 -0
- package/skills/oma-backend/variants/node/tech-stack.md +33 -0
- package/skills/oma-backend/variants/python/api-template.py +378 -0
- package/skills/oma-backend/variants/python/snippets.md +199 -0
- package/skills/oma-backend/variants/python/stack.yaml +18 -0
- package/skills/oma-backend/variants/python/tech-stack.md +45 -0
- package/skills/oma-backend/variants/rust/api-template.rs +635 -0
- package/skills/oma-backend/variants/rust/snippets.md +471 -0
- package/skills/oma-backend/variants/rust/stack.yaml +20 -0
- package/skills/oma-backend/variants/rust/tech-stack.md +36 -0
- package/skills/oma-backend/variants/stack.schema.json +73 -0
- package/skills/oma-brainstorm/SKILL.md +166 -0
- package/skills/oma-brainstorm/resources/triz-lite.md +117 -0
- package/skills/oma-coordination/SKILL.md +171 -0
- package/skills/oma-db/SKILL.md +201 -0
- package/skills/oma-db/resources/anti-patterns.md +177 -0
- package/skills/oma-db/resources/checklist.md +67 -0
- package/skills/oma-db/resources/document-templates.md +107 -0
- package/skills/oma-db/resources/error-playbook.md +50 -0
- package/skills/oma-db/resources/examples.md +170 -0
- package/skills/oma-db/resources/execution-protocol.md +127 -0
- package/skills/oma-db/resources/iso-controls.md +98 -0
- package/skills/oma-db/resources/migration-playbook.md +93 -0
- package/skills/oma-db/resources/query-tuning.md +57 -0
- package/skills/oma-db/resources/vector-db.md +159 -0
- package/skills/oma-debug/SKILL.md +146 -0
- package/skills/oma-debug/resources/bug-report-template.md +327 -0
- package/skills/oma-debug/resources/checklist.md +31 -0
- package/skills/oma-debug/resources/common-patterns.md +734 -0
- package/skills/oma-debug/resources/debugging-checklist.md +364 -0
- package/skills/oma-debug/resources/error-playbook.md +94 -0
- package/skills/oma-debug/resources/execution-protocol.md +40 -0
- package/skills/oma-design/SKILL.md +135 -0
- package/skills/oma-design/resources/asset-strategy.md +34 -0
- package/skills/oma-design/resources/checklist.md +63 -0
- package/skills/oma-design/resources/data-grid.md +48 -0
- package/skills/oma-design/resources/design-md-spec.md +107 -0
- package/skills/oma-design/resources/design-tokens.md +53 -0
- package/skills/oma-design/resources/error-playbook.md +18 -0
- package/skills/oma-design/resources/execution-protocol.md +95 -0
- package/skills/oma-design/resources/external-design-skills.md +130 -0
- package/skills/oma-design/resources/getdesign-fetcher.md +104 -0
- package/skills/oma-design/resources/product-interface-review.md +59 -0
- package/skills/oma-design/resources/redesign-protocol.md +52 -0
- package/skills/oma-design/resources/stitch-integration.md +244 -0
- package/skills/oma-dev-workflow/SKILL.md +375 -0
- package/skills/oma-dev-workflow/resources/affected-checks.py +58 -0
- package/skills/oma-dev-workflow/resources/api-workflows.md +58 -0
- package/skills/oma-dev-workflow/resources/database-patterns.md +107 -0
- package/skills/oma-dev-workflow/resources/i18n-patterns.md +63 -0
- package/skills/oma-dev-workflow/resources/release-coordination.md +240 -0
- package/skills/oma-dev-workflow/resources/tooling-profiles.md +217 -0
- package/skills/oma-dev-workflow/resources/troubleshooting.md +78 -0
- package/skills/oma-dev-workflow/resources/validation-pipeline.md +246 -0
- package/skills/oma-docs/SKILL.md +77 -0
- package/skills/oma-docs/resources/commands.md +76 -0
- package/skills/oma-explanation/SKILL.md +212 -0
- package/skills/oma-explanation/resources/document-structure.md +115 -0
- package/skills/oma-explanation/resources/draft-format.md +199 -0
- package/skills/oma-explanation/resources/html-contract.md +102 -0
- package/skills/oma-frontend/SKILL.md +227 -0
- package/skills/oma-frontend/resources/angular-rules.md +110 -0
- package/skills/oma-frontend/resources/checklist.md +76 -0
- package/skills/oma-frontend/resources/error-playbook.md +125 -0
- package/skills/oma-frontend/resources/execution-protocol.md +46 -0
- package/skills/oma-frontend/resources/snippets.md +354 -0
- package/skills/oma-frontend/resources/specialized-visual-implementation.md +193 -0
- package/skills/oma-frontend/resources/tailwind-rules.md +83 -0
- package/skills/oma-frontend/resources/tech-stack.md +156 -0
- package/skills/oma-hwp/SKILL.md +166 -0
- package/skills/oma-hwp/config/hwp-config.yaml +35 -0
- package/skills/oma-hwp/resources/balanced-tables.ts +39 -0
- package/skills/oma-hwp/resources/execution-protocol.md +145 -0
- package/skills/oma-hwp/resources/flatten-tables.ts +101 -0
- package/skills/oma-hwp/resources/package.json +13 -0
- package/skills/oma-hwp/resources/troubleshooting.md +70 -0
- package/skills/oma-hwp/resources/tsconfig.json +10 -0
- package/skills/oma-hwp/resources/turndown-plugin-gfm.d.ts +9 -0
- package/skills/oma-image/SKILL.md +142 -0
- package/skills/oma-image/config/image-config.yaml +70 -0
- package/skills/oma-image/resources/checklist.md +18 -0
- package/skills/oma-image/resources/execution-protocol.md +117 -0
- package/skills/oma-image/resources/invocation.md +105 -0
- package/skills/oma-image/resources/prompt-tips.md +71 -0
- package/skills/oma-image/resources/vendor-matrix.md +90 -0
- package/skills/oma-market/SKILL.md +142 -0
- package/skills/oma-market/resources/checklist.md +12 -0
- package/skills/oma-market/resources/error-playbook.md +12 -0
- package/skills/oma-market/resources/execution-protocol.md +60 -0
- package/skills/oma-market/resources/frameworks/pestel.md +101 -0
- package/skills/oma-market/resources/frameworks/porters-5f.md +90 -0
- package/skills/oma-market/resources/frameworks/swot.md +61 -0
- package/skills/oma-market/resources/intent-rules.md +35 -0
- package/skills/oma-market/resources/output-laws.md +53 -0
- package/skills/oma-mobile/SKILL.md +168 -0
- package/skills/oma-mobile/resources/checklist.md +77 -0
- package/skills/oma-mobile/resources/error-playbook.md +198 -0
- package/skills/oma-mobile/resources/execution-protocol.md +47 -0
- package/skills/oma-mobile/resources/screen-template.dart +331 -0
- package/skills/oma-mobile/resources/screen-template.swift +239 -0
- package/skills/oma-mobile/resources/screen-template.tsx +179 -0
- package/skills/oma-mobile/resources/tech-stack.md +69 -0
- package/skills/oma-mobile/variants/README.md +45 -0
- package/skills/oma-mobile/variants/flutter/api-template.dart +461 -0
- package/skills/oma-mobile/variants/flutter/snippets.md +1353 -0
- package/skills/oma-mobile/variants/flutter/stack.yaml +21 -0
- package/skills/oma-mobile/variants/flutter/tech-stack.md +201 -0
- package/skills/oma-mobile/variants/kotlin-android/api-template.kt +182 -0
- package/skills/oma-mobile/variants/kotlin-android/snippets.md +871 -0
- package/skills/oma-mobile/variants/kotlin-android/stack.yaml +32 -0
- package/skills/oma-mobile/variants/kotlin-android/tech-stack.md +159 -0
- package/skills/oma-mobile/variants/react-native/api-template.ts +531 -0
- package/skills/oma-mobile/variants/react-native/snippets.md +1014 -0
- package/skills/oma-mobile/variants/react-native/stack.yaml +22 -0
- package/skills/oma-mobile/variants/react-native/tech-stack.md +192 -0
- package/skills/oma-mobile/variants/stack.schema.json +68 -0
- package/skills/oma-mobile/variants/swift-ios/api-template.swift +165 -0
- package/skills/oma-mobile/variants/swift-ios/snippets.md +1028 -0
- package/skills/oma-mobile/variants/swift-ios/stack.yaml +25 -0
- package/skills/oma-mobile/variants/swift-ios/tech-stack.md +174 -0
- package/skills/oma-observability/SKILL.md +225 -0
- package/skills/oma-observability/resources/anti-patterns.md +555 -0
- package/skills/oma-observability/resources/boundaries/cross-application.md +348 -0
- package/skills/oma-observability/resources/boundaries/multi-tenant.md +290 -0
- package/skills/oma-observability/resources/boundaries/release.md +372 -0
- package/skills/oma-observability/resources/boundaries/slo.md +225 -0
- package/skills/oma-observability/resources/checklist.md +123 -0
- package/skills/oma-observability/resources/examples.md +448 -0
- package/skills/oma-observability/resources/execution-protocol.md +166 -0
- package/skills/oma-observability/resources/incident-forensics.md +348 -0
- package/skills/oma-observability/resources/intent-rules.md +307 -0
- package/skills/oma-observability/resources/layers/L3-network.md +281 -0
- package/skills/oma-observability/resources/layers/L4-transport.md +299 -0
- package/skills/oma-observability/resources/layers/L7-application/crash-analytics.md +359 -0
- package/skills/oma-observability/resources/layers/L7-application/mobile-rum.md +278 -0
- package/skills/oma-observability/resources/layers/L7-application/waf.md +246 -0
- package/skills/oma-observability/resources/layers/L7-application/web-rum.md +350 -0
- package/skills/oma-observability/resources/layers/mesh.md +368 -0
- package/skills/oma-observability/resources/matrix.md +177 -0
- package/skills/oma-observability/resources/meta-observability.md +605 -0
- package/skills/oma-observability/resources/observability-as-code.md +666 -0
- package/skills/oma-observability/resources/signals/audit.md +310 -0
- package/skills/oma-observability/resources/signals/cost.md +303 -0
- package/skills/oma-observability/resources/signals/logs.md +263 -0
- package/skills/oma-observability/resources/signals/metrics.md +478 -0
- package/skills/oma-observability/resources/signals/privacy.md +351 -0
- package/skills/oma-observability/resources/signals/profiles.md +245 -0
- package/skills/oma-observability/resources/signals/traces.md +360 -0
- package/skills/oma-observability/resources/standards.md +214 -0
- package/skills/oma-observability/resources/transport/collector-topology.md +308 -0
- package/skills/oma-observability/resources/transport/otlp-grpc-vs-http.md +256 -0
- package/skills/oma-observability/resources/transport/sampling-recipes.md +297 -0
- package/skills/oma-observability/resources/transport/udp-statsd-mtu.md +167 -0
- package/skills/oma-observability/resources/vendor-categories.md +352 -0
- package/skills/oma-orchestration/SKILL.md +302 -0
- package/skills/oma-orchestration/config/cli-config.yaml +92 -0
- package/skills/oma-orchestration/resources/memory-schema.md +232 -0
- package/skills/oma-orchestration/resources/subagent-prompt-template.md +30 -0
- package/skills/oma-orchestration/scripts/parallel-run.sh +6 -0
- package/skills/oma-orchestration/scripts/spawn-agent.sh +5 -0
- package/skills/oma-orchestration/scripts/verify.sh +20 -0
- package/skills/oma-orchestration/templates/backend-task.md +19 -0
- package/skills/oma-orchestration/templates/debug-task.md +16 -0
- package/skills/oma-orchestration/templates/frontend-task.md +18 -0
- package/skills/oma-orchestration/templates/mobile-task.md +18 -0
- package/skills/oma-orchestration/templates/qa-task.md +16 -0
- package/skills/oma-orchestration/templates/tasks-example.yaml +15 -0
- package/skills/oma-pdf/SKILL.md +162 -0
- package/skills/oma-pdf/config/pdf-config.yaml +27 -0
- package/skills/oma-pdf/resources/execution-protocol.md +127 -0
- package/skills/oma-pm/SKILL.md +157 -0
- package/skills/oma-pm/resources/error-playbook.md +75 -0
- package/skills/oma-pm/resources/examples.md +439 -0
- package/skills/oma-pm/resources/execution-protocol.md +62 -0
- package/skills/oma-pm/resources/iso-planning.md +110 -0
- package/skills/oma-pm/resources/plan-phase-protocol.md +66 -0
- package/skills/oma-pm/resources/task-template.json +86 -0
- package/skills/oma-qa/SKILL.md +141 -0
- package/skills/oma-qa/resources/checklist.md +339 -0
- package/skills/oma-qa/resources/error-playbook.md +98 -0
- package/skills/oma-qa/resources/execution-protocol.md +169 -0
- package/skills/oma-qa/resources/iso-quality.md +82 -0
- package/skills/oma-qa/resources/verify-ship-protocol.md +116 -0
- package/skills/oma-recap/SKILL.md +245 -0
- package/skills/oma-recap/resources/output-formats.md +83 -0
- package/skills/oma-refactor/SKILL.md +184 -0
- package/skills/oma-refactor/resources/definition.md +108 -0
- package/skills/oma-refactor/resources/governance.md +33 -0
- package/skills/oma-refactor/resources/hotspots.py +44 -0
- package/skills/oma-refactor/resources/measurement.md +93 -0
- package/skills/oma-scholar/SKILL.md +276 -0
- package/skills/oma-scholar/config/scholar-config.yaml +79 -0
- package/skills/oma-scholar/resources/api-endpoints.md +174 -0
- package/skills/oma-scholar/resources/checklist.md +92 -0
- package/skills/oma-scholar/resources/execution-protocol.md +224 -0
- package/skills/oma-scholar/resources/fallback-providers.md +143 -0
- package/skills/oma-scholar/resources/setup-openalex.md +85 -0
- package/skills/oma-scholar/resources/sidecar-spec.md +341 -0
- package/skills/oma-scholar/resources/upstream-spec-cache.md +972 -0
- package/skills/oma-scm/SKILL.md +103 -0
- package/skills/oma-scm/resources/cm-operations.md +56 -0
- package/skills/oma-scm/resources/codeowners-playbook.md +45 -0
- package/skills/oma-scm/resources/conventional-commits.md +108 -0
- package/skills/oma-scm/resources/merge-risk.md +76 -0
- package/skills/oma-scm/resources/onboarding-risk-signals.md +71 -0
- package/skills/oma-search/SKILL.md +125 -0
- package/skills/oma-search/resources/checklist.md +36 -0
- package/skills/oma-search/resources/error-playbook.md +66 -0
- package/skills/oma-search/resources/examples.md +80 -0
- package/skills/oma-search/resources/execution-protocol.md +86 -0
- package/skills/oma-search/resources/intent-rules.md +47 -0
- package/skills/oma-search/resources/trust-registry.md +53 -0
- package/skills/oma-security/SKILL.md +172 -0
- package/skills/oma-security/resources/artex.md +108 -0
- package/skills/oma-security/resources/ci.md +134 -0
- package/skills/oma-security/resources/cisco-source.md +108 -0
- package/skills/oma-security/resources/deepsec-config.md +45 -0
- package/skills/oma-security/resources/deepsec-matchers.md +35 -0
- package/skills/oma-security/resources/deepsec-scanning.md +45 -0
- package/skills/oma-security/resources/deepsec-setup.md +41 -0
- package/skills/oma-security/resources/findings-contract.md +408 -0
- package/skills/oma-security/resources/mcp-scanning.md +122 -0
- package/skills/oma-security/resources/skill-scanning.md +106 -0
- package/skills/oma-security/resources/validation.md +71 -0
- package/skills/oma-skill-creation/SKILL.md +84 -0
- package/skills/oma-skill-creation/resources/prompt-evaluation.md +36 -0
- package/skills/oma-skill-creation/resources/ssl-lite-template.md +108 -0
- package/skills/oma-skill-creation/resources/validation-checklist.md +101 -0
- package/skills/oma-slide/SKILL.md +277 -0
- package/skills/oma-slide/resources/animation-patterns.md +245 -0
- package/skills/oma-slide/resources/assets/deck-stage.js +514 -0
- package/skills/oma-slide/resources/assets/viewport-base.css +257 -0
- package/skills/oma-slide/resources/canva-integration.md +203 -0
- package/skills/oma-slide/resources/checklist.md +46 -0
- package/skills/oma-slide/resources/design-doctrine.md +260 -0
- package/skills/oma-slide/resources/fixed-stage.md +232 -0
- package/skills/oma-slide/resources/generation-protocol.md +393 -0
- package/skills/oma-slide/resources/native-pptx.md +84 -0
- package/skills/oma-slide/resources/selection-index.json +461 -0
- package/skills/oma-slide/resources/style-presets.LICENSE +10 -0
- package/skills/oma-slide/resources/style-presets.md +520 -0
- package/skills/oma-tf-infra/SKILL.md +201 -0
- package/skills/oma-tf-infra/resources/checklist.md +53 -0
- package/skills/oma-tf-infra/resources/cost-optimization.md +574 -0
- package/skills/oma-tf-infra/resources/error-playbook.md +68 -0
- package/skills/oma-tf-infra/resources/examples.md +38 -0
- package/skills/oma-tf-infra/resources/execution-protocol.md +129 -0
- package/skills/oma-tf-infra/resources/iso-42001-infra.md +229 -0
- package/skills/oma-tf-infra/resources/multi-cloud-examples.md +241 -0
- package/skills/oma-tf-infra/resources/policy-testing-examples.md +332 -0
- package/skills/oma-translation/SKILL.md +229 -0
- package/skills/oma-translation/resources/anti-ai-patterns.md +104 -0
- package/skills/oma-translation/resources/lang/_template.md +73 -0
- package/skills/oma-translation/resources/lang/en.md +123 -0
- package/skills/oma-translation/resources/lang/ja.md +274 -0
- package/skills/oma-translation/resources/lang/ko.md +228 -0
- package/skills/oma-translation/resources/lang/zh.md +285 -0
- package/skills/oma-translation/resources/style-skills.md +104 -0
- package/skills/oma-translation/resources/translation-rubric.md +126 -0
- package/skills/oma-video/SKILL.md +229 -0
- package/skills/oma-video/config/video-config.yaml +60 -0
- package/skills/oma-video/resources/checklist.md +26 -0
- package/skills/oma-video/resources/execution-protocol.md +122 -0
- package/skills/oma-video/resources/existing-media.md +185 -0
- package/skills/oma-video/resources/hyperframes-authoring/README.md +44 -0
- package/skills/oma-video/resources/hyperframes-authoring/demo.md +31 -0
- package/skills/oma-video/resources/hyperframes-authoring/explainer.md +10 -0
- package/skills/oma-video/resources/hyperframes-authoring/shorts.md +10 -0
- package/skills/oma-video/resources/motion-principles.md +81 -0
- package/skills/oma-video/resources/mpt/driver.py +301 -0
- package/skills/oma-video/resources/prompt-tips.md +75 -0
- package/skills/oma-video/resources/script-schema.md +81 -0
- package/skills/oma-video/resources/sound-design.md +127 -0
- package/skills/oma-video/resources/strudel/package.json +11 -0
- package/skills/oma-video/resources/strudel/page.html +87 -0
- package/skills/oma-video/resources/strudel/render.mjs +295 -0
- package/skills/oma-video/resources/vendor-matrix.md +124 -0
- package/skills/oma-voice/SKILL.md +249 -0
- package/skills/oma-voice/config/voice-config.yaml +30 -0
- package/skills/oma-voice/resources/audio-processing.md +119 -0
- package/skills/oma-voice/resources/checklist.md +47 -0
- package/skills/oma-voice/resources/execution-protocol.md +215 -0
- package/skills/oma-voice/resources/prompt-tips.md +43 -0
- package/skills/oma-voice/resources/voice-matrix.md +51 -0
- package/skills/oma-voice/resources/voicestudio.md +87 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
---
|
|
2
|
+
otel_spec: "1.x (stable API/SDK)"
|
|
3
|
+
otel_semconv: "1.43.0 (2026-07)"
|
|
4
|
+
notes:
|
|
5
|
+
- "OpenMetrics: project specification (see primary source below)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Metrics Signal
|
|
9
|
+
|
|
10
|
+
## 1. Scope
|
|
11
|
+
|
|
12
|
+
Metrics are the "M" in MELT+P (Metrics, Events, Logs, Traces + Profiles).
|
|
13
|
+
|
|
14
|
+
This file covers:
|
|
15
|
+
- OTel metric instrument types and their sync/async variants
|
|
16
|
+
- Prometheus exposition format and the OpenMetrics project specification
|
|
17
|
+
- SLI computation patterns (Golden Signals, RED, USE) and healthcheck integration
|
|
18
|
+
- `hostmetrics` receiver for host-level collection
|
|
19
|
+
- Kubernetes metric sources
|
|
20
|
+
- Application metric integration via OTel SDK
|
|
21
|
+
- OpenCost metric surface for cost attribution
|
|
22
|
+
- Cardinality budget enforcement
|
|
23
|
+
- Long-term storage backend options
|
|
24
|
+
|
|
25
|
+
Out of scope:
|
|
26
|
+
- Full SLO framework, error budget policy, and burn-rate alert rules: see `../boundaries/slo.md`
|
|
27
|
+
- Full FinOps unit economics and cost allocation model: see `cost.md`
|
|
28
|
+
- Cardinality guardrail detail and pipeline remediation: see `../meta-observability.md §Section C`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 2. OTel Metric Instrument Types (Stable)
|
|
33
|
+
|
|
34
|
+
Source: <https://opentelemetry.io/docs/specs/otel/metrics/api/>
|
|
35
|
+
|
|
36
|
+
Choose an OTel Meter instrument based on measurement semantics. Counter, UpDownCounter, Gauge, and Histogram have the variants below. Summary is a legacy metric data type for interoperability, not a Meter API instrument.
|
|
37
|
+
|
|
38
|
+
### 2.1 Counter
|
|
39
|
+
|
|
40
|
+
Monotonic, cumulative-only. Value never decreases. Measures cumulative totals.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Use for: requests_total, errors_total, bytes_sent_total
|
|
44
|
+
Never use for: values that can decrease (use UpDownCounter)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Sync variant: `counter.Add(ctx, delta, attrs...)`; caller increments explicitly.
|
|
48
|
+
Async variant: `ObservableCounter`; callback provides absolute cumulative value.
|
|
49
|
+
|
|
50
|
+
### 2.2 UpDownCounter
|
|
51
|
+
|
|
52
|
+
Monotonic: no. Can increment or decrement. Measures quantities that fluctuate.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Use for: queue_length, active_connections, in_flight_requests
|
|
56
|
+
Never use for: strictly increasing values (use Counter)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Sync variant: `upDownCounter.Add(ctx, delta, attrs...)` where delta is positive or negative.
|
|
60
|
+
Async variant: `ObservableUpDownCounter`; callback provides current value.
|
|
61
|
+
|
|
62
|
+
### 2.3 Gauge
|
|
63
|
+
|
|
64
|
+
Point-in-time observation of a current value. No accumulation.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Use for: cpu_usage, memory_used_bytes, temperature_celsius, cache_hit_ratio
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Sync variant: `gauge.Record(ctx, value, attrs...)`.
|
|
71
|
+
Async variant: `ObservableGauge`; preferred for values read from an external source (OS, hardware sensor).
|
|
72
|
+
|
|
73
|
+
### 2.4 Histogram
|
|
74
|
+
|
|
75
|
+
Distribution of values. Captures bucket counts, sum, and count. Supports quantile computation via `histogram_quantile` at query time.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Use for: request_duration_seconds, response_size_bytes, db_query_duration_seconds
|
|
79
|
+
Prefer over Summary for all new instrumentation
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Sync variant only: `histogram.Record(ctx, value, attrs...)`.
|
|
83
|
+
Configure explicit bucket boundaries per instrument to control cardinality. Default OTel SDK buckets: `[0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000]` (milliseconds; override for seconds-based metrics).
|
|
84
|
+
|
|
85
|
+
### 2.5 Summary (legacy interoperability data, not a Meter instrument)
|
|
86
|
+
|
|
87
|
+
Imported Prometheus/OpenCensus-style summaries contain client-computed quantiles. The OTel metric data model can carry legacy Summary points; the Meter API does not create a Summary instrument.
|
|
88
|
+
|
|
89
|
+
Limitations:
|
|
90
|
+
- Quantiles are computed per-process; they cannot be aggregated across replicas.
|
|
91
|
+
- `p99` from three replicas cannot be merged into a fleet-level `p99`.
|
|
92
|
+
- Use Histogram + `histogram_quantile` instead for any distributed system.
|
|
93
|
+
|
|
94
|
+
When to keep existing Summary metrics: only if the downstream consumer cannot be migrated and the measurement is single-process.
|
|
95
|
+
|
|
96
|
+
### 2.6 Temporality: Delta vs Cumulative
|
|
97
|
+
|
|
98
|
+
The OTLP metric exporter defaults to `cumulative`. Delta is a configurable preference for supported instrument kinds; verify the exporter and language implementation.
|
|
99
|
+
Prometheus counters expose cumulative values; gauges can increase or decrease. Choose conversion according to the instrument and backend, not a blanket monotonic rule for every metric.
|
|
100
|
+
|
|
101
|
+
Set the preference via environment variable:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For delta OTLP input destined for a cumulative backend, use the Collector delta-to-cumulative processor supported by the pinned distribution/version (`delta_to_cumulative`, formerly `deltatocumulative`). `prometheusreceiver` scrapes Prometheus input; it is not a delta OTLP conversion processor. Sources: <https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/> and <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/deltatocumulativeprocessor>.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 3. Prometheus Exposition Format
|
|
112
|
+
|
|
113
|
+
Source: <https://prometheus.io/docs/instrumenting/exposition_formats/>
|
|
114
|
+
OpenMetrics: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md>
|
|
115
|
+
|
|
116
|
+
### 3.1 Text Format Structure
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
# HELP http_requests_total Total HTTP requests received
|
|
120
|
+
# TYPE http_requests_total counter
|
|
121
|
+
http_requests_total{method="GET",status="200",route="/api/v1/users"} 1234 1714521600000
|
|
122
|
+
http_requests_total{method="POST",status="422",route="/api/v1/users"} 7 1714521600000
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Rules:
|
|
126
|
+
- `# HELP` line: one per metric family, human-readable description.
|
|
127
|
+
- `# TYPE` line: one per metric family, declares instrument type.
|
|
128
|
+
- Metric line: `name{label="value",...} value [timestamp_ms]`. Timestamp is optional.
|
|
129
|
+
- Blank line separates metric families.
|
|
130
|
+
|
|
131
|
+
### 3.2 Naming Convention
|
|
132
|
+
|
|
133
|
+
Pattern: `{component}_{operation}_{unit}_{suffix}`
|
|
134
|
+
|
|
135
|
+
| Suffix | When to use | Example |
|
|
136
|
+
|--------|-------------|---------|
|
|
137
|
+
| `_total` | Counters (monotonic) | `http_requests_total` |
|
|
138
|
+
| `_seconds` | Duration (always seconds, not ms) | `http_request_duration_seconds` |
|
|
139
|
+
| `_bytes` | Size in bytes | `response_size_bytes` |
|
|
140
|
+
| `_ratio` | Fraction 0.0–1.0 | `cache_hit_ratio` |
|
|
141
|
+
| `_bucket` | Histogram bucket (auto-appended) | `http_request_duration_seconds_bucket` |
|
|
142
|
+
| `_count` | Histogram observation count (auto) | `http_request_duration_seconds_count` |
|
|
143
|
+
| `_sum` | Histogram observation sum (auto) | `http_request_duration_seconds_sum` |
|
|
144
|
+
|
|
145
|
+
### 3.3 Label Rules
|
|
146
|
+
|
|
147
|
+
Low-cardinality labels only. Cross-ref `../meta-observability.md §Section C Cardinality Guardrails`.
|
|
148
|
+
|
|
149
|
+
Safe label examples: `method`, `status_code`, `route` (normalized), `service`, `region`, `env`.
|
|
150
|
+
Forbidden label examples: `user.id`, `request.id`, `trace.id`, `url.full` (raw), `error.message`.
|
|
151
|
+
|
|
152
|
+
### 3.4 OpenMetrics Snippet
|
|
153
|
+
|
|
154
|
+
OpenMetrics is a project specification for a metric exposition format. Key difference: `# EOF` terminator is required, and `_total` suffix is mandatory for counters in the `# TYPE counter` family.
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
# HELP http_requests Total HTTP requests received.
|
|
158
|
+
# TYPE http_requests counter
|
|
159
|
+
http_requests_total{method="GET",status="200"} 1234.0 1714521600.000
|
|
160
|
+
# EOF
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The OTel Prometheus exporter supports both Prometheus text format and OpenMetrics format; select via `Accept: application/openmetrics-text` request header.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 4. SLI / Healthcheck Basics
|
|
168
|
+
|
|
169
|
+
### 4.1 Google SRE Golden Signals
|
|
170
|
+
|
|
171
|
+
Four signals for monitoring any request-serving system:
|
|
172
|
+
|
|
173
|
+
| Signal | Description | Primary instrument |
|
|
174
|
+
|--------|-------------|--------------------|
|
|
175
|
+
| Latency | Time to serve a request (good vs error latency tracked separately) | Histogram |
|
|
176
|
+
| Traffic | Volume of demand (requests/sec, queries/sec) | Counter rate |
|
|
177
|
+
| Errors | Rate of failed requests (explicit 5xx, implicit latency budget exceeded) | Counter rate |
|
|
178
|
+
| Saturation | How "full" the service is; utilization as fraction of capacity | Gauge or Histogram |
|
|
179
|
+
|
|
180
|
+
### 4.2 RED Method (request-serving services)
|
|
181
|
+
|
|
182
|
+
| Signal | PromQL sketch |
|
|
183
|
+
|--------|---------------|
|
|
184
|
+
| Rate | `sum(rate(http_requests_total[5m])) by (service)` |
|
|
185
|
+
| Errors | `sum(rate(http_requests_total{status=~"5.."}[5m])) by (service)` |
|
|
186
|
+
| Duration | `histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))` |
|
|
187
|
+
|
|
188
|
+
### 4.3 USE Method (resource-level: CPU, memory, disk)
|
|
189
|
+
|
|
190
|
+
| Signal | PromQL sketch |
|
|
191
|
+
|--------|---------------|
|
|
192
|
+
| Utilization | `avg(system.cpu.utilization) by (host)` |
|
|
193
|
+
| Saturation | `system.cpu.load_average.1m / count(system.cpu.utilization) by (host)` |
|
|
194
|
+
| Errors | `rate(system.network.errors{direction="transmit"}[5m])` |
|
|
195
|
+
|
|
196
|
+
### 4.4 SLI Examples (PromQL)
|
|
197
|
+
|
|
198
|
+
Availability SLI (fraction of successful requests over the measurement window):
|
|
199
|
+
|
|
200
|
+
```promql
|
|
201
|
+
sum(rate(http_requests_total{status=~"2..|3.."}[5m]))
|
|
202
|
+
/
|
|
203
|
+
sum(rate(http_requests_total[5m]))
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Latency SLI (p99 from histogram, 5-minute rolling window):
|
|
207
|
+
|
|
208
|
+
```promql
|
|
209
|
+
histogram_quantile(
|
|
210
|
+
0.99,
|
|
211
|
+
sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service)
|
|
212
|
+
)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Cross-ref `../boundaries/slo.md` for SLO target definitions, error-budget burn-rate computation, and multi-window alert rules.
|
|
216
|
+
|
|
217
|
+
### 4.5 Healthcheck Endpoints and Metrics
|
|
218
|
+
|
|
219
|
+
Kubernetes readiness and liveness probes (`/readyz`, `/healthz`) are HTTP checks; they are not metrics themselves. However, the underlying health state MUST be exposed as a metric so that dashboards and SLO computation can consume it continuously:
|
|
220
|
+
|
|
221
|
+
```promql
|
|
222
|
+
# Health metric emitted by application (1 = healthy, 0 = unhealthy)
|
|
223
|
+
up{job="my-service"} # Prometheus scrape synthetic metric
|
|
224
|
+
|
|
225
|
+
# Custom health gauge from OTel SDK
|
|
226
|
+
service_health_status{service="checkout", check="database"} 1
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Anti-pattern: a healthcheck that returns 200 without reflecting actual dependency health. If the database is down, the readiness probe MUST return a non-2xx status, and the `service_health_status` gauge MUST reflect 0. A probe that always returns 200 is not tied to an underlying SLI metric and produces false-positive availability signals.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 5. hostmetrics Receiver (OTel Collector)
|
|
234
|
+
|
|
235
|
+
Source: <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver>
|
|
236
|
+
|
|
237
|
+
The `hostmetrics` receiver collects host-level OS metrics without requiring a separate agent. It runs inside the OTel Collector process and reads from OS interfaces.
|
|
238
|
+
|
|
239
|
+
### 5.1 Deployment
|
|
240
|
+
|
|
241
|
+
Deploy as DaemonSet (one Collector per node) to collect per-node metrics. Cross-ref `../transport/collector-topology.md` for the two-tier topology (DaemonSet agent + gateway).
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
receivers:
|
|
245
|
+
hostmetrics:
|
|
246
|
+
collection_interval: 30s
|
|
247
|
+
root_path: /hostfs # required when running in container; mount host /proc and /sys
|
|
248
|
+
scrapers:
|
|
249
|
+
cpu: {}
|
|
250
|
+
memory: {}
|
|
251
|
+
disk: {}
|
|
252
|
+
filesystem: {}
|
|
253
|
+
network: {}
|
|
254
|
+
load: {}
|
|
255
|
+
paging: {}
|
|
256
|
+
process:
|
|
257
|
+
mute_process_name_error: true
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### 5.2 Key Metrics
|
|
261
|
+
|
|
262
|
+
| Metric | Type | Description |
|
|
263
|
+
|--------|------|-------------|
|
|
264
|
+
| `system.cpu.time` | Counter | CPU time by state (user, system, idle, iowait, irq, softirq, steal, nice) |
|
|
265
|
+
| `system.cpu.utilization` | Gauge | CPU utilization 0.0–1.0 by state |
|
|
266
|
+
| `system.memory.usage` | Gauge | Memory bytes by state (used, free, cached, buffered) |
|
|
267
|
+
| `system.memory.utilization` | Gauge | Memory utilization 0.0–1.0 by state |
|
|
268
|
+
| `system.disk.io` | Counter | Disk bytes read/written by device |
|
|
269
|
+
| `system.disk.io_time` | Counter | Time disk is active by device (seconds) |
|
|
270
|
+
| `system.filesystem.usage` | Gauge | Filesystem bytes by mount point and state |
|
|
271
|
+
| `system.network.io` | Counter | Network bytes transmitted/received by interface |
|
|
272
|
+
| `system.network.errors` | Counter | Network errors by interface and direction |
|
|
273
|
+
| `system.load.average.1m` | Gauge | 1-minute load average |
|
|
274
|
+
| `system.load.average.5m` | Gauge | 5-minute load average |
|
|
275
|
+
| `system.load.average.15m` | Gauge | 15-minute load average |
|
|
276
|
+
| `system.paging.usage` | Gauge | Swap/paging space by state |
|
|
277
|
+
| `process.cpu.time` | Counter | Per-process CPU time by state |
|
|
278
|
+
| `process.memory.physical_usage` | Gauge | Per-process RSS in bytes |
|
|
279
|
+
|
|
280
|
+
### 5.3 Alternative: Prometheus Node Exporter
|
|
281
|
+
|
|
282
|
+
For environments where the OTel Collector cannot run on the host, Prometheus Node Exporter is the mature alternative (CNCF Graduated). Scrape with `prometheusreceiver` and convert to OTel metrics via the Collector pipeline. Metric names differ from OTel semconv (e.g., `node_cpu_seconds_total` vs `system.cpu.time`). Prefer `hostmetrics` receiver for new deployments.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 6. Kubernetes Metric Sources
|
|
287
|
+
|
|
288
|
+
Three complementary sources cover cluster, node, pod, and container metrics:
|
|
289
|
+
|
|
290
|
+
| Source | Scope | Collector component |
|
|
291
|
+
|--------|-------|---------------------|
|
|
292
|
+
| `kubeletstats` receiver | Pod and container metrics from kubelet API | `kubeletstatsreceiver` |
|
|
293
|
+
| `k8scluster` receiver | Cluster-level state (node conditions, pod phases, deployment replicas) | `k8sclusterreceiver` |
|
|
294
|
+
| Prometheus operator + ServiceMonitor CRD | Scrape application Prometheus endpoints declaratively | `prometheusreceiver` |
|
|
295
|
+
|
|
296
|
+
Cross-ref `../transport/collector-topology.md §Component preferences` for the recommended configuration of each source in a DaemonSet + gateway topology.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## 7. Application Metric Integration
|
|
301
|
+
|
|
302
|
+
### 7.1 Auto-instrumentation
|
|
303
|
+
|
|
304
|
+
OTel SDK auto-instrumentation provides RED metrics out-of-the-box for common frameworks:
|
|
305
|
+
- HTTP servers: `http.server.request.duration` (Histogram), `http.server.active_requests` (UpDownCounter)
|
|
306
|
+
- HTTP clients: `http.client.request.duration` (Histogram)
|
|
307
|
+
- gRPC: `rpc.server.duration` (Histogram), `rpc.client.duration` (Histogram)
|
|
308
|
+
- Database clients: `db.client.operation.duration` (Histogram)
|
|
309
|
+
|
|
310
|
+
These use OTel semconv stable attributes (`http.*`, `rpc.*`, `db.*` core groups). Verify your framework's OTel instrumentation library supports the attribute groups before relying on them in SLO computation.
|
|
311
|
+
|
|
312
|
+
### 7.2 Custom Metrics via Meter API
|
|
313
|
+
|
|
314
|
+
```python
|
|
315
|
+
# Python SDK example — creating a histogram for a custom operation
|
|
316
|
+
from opentelemetry import metrics
|
|
317
|
+
|
|
318
|
+
meter = metrics.get_meter("com.example.checkout", version="1.0.0")
|
|
319
|
+
|
|
320
|
+
payment_duration = meter.create_histogram(
|
|
321
|
+
name="payment.processing.duration",
|
|
322
|
+
unit="s",
|
|
323
|
+
description="Time to process a payment request",
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
# Recording a measurement
|
|
327
|
+
payment_duration.record(0.42, {"payment.method": "card", "currency": "USD"})
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### 7.3 Attribute Allow-listing for Cardinality Control
|
|
331
|
+
|
|
332
|
+
Explicitly allow-list attributes on each instrument view to prevent label explosion. Cross-ref `../meta-observability.md §Section C`:
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
from opentelemetry.sdk.metrics.view import View
|
|
336
|
+
|
|
337
|
+
view = View(
|
|
338
|
+
instrument_name="payment.processing.duration",
|
|
339
|
+
attribute_keys={"payment.method", "currency"}, # only these two labels emitted
|
|
340
|
+
)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## 8. OpenCost Metric Surface
|
|
346
|
+
|
|
347
|
+
Source: <https://www.opencost.io/docs/configuration/prometheus>
|
|
348
|
+
|
|
349
|
+
OpenCost (CNCF Incubating) exposes cost attribution in Prometheus format at its `/metrics` endpoint. Scrape via `prometheusreceiver` to bring cost into the same TSDB as latency and error metrics, making cost a dimension alongside performance.
|
|
350
|
+
|
|
351
|
+
### 8.1 Key OpenCost Metrics
|
|
352
|
+
|
|
353
|
+
OpenCost exposes allocation and price gauges, not automatic namespace/workload cost counters. Multiply matching quantities and rates and aggregate by namespace; see `cost.md` for the concrete compute-cost query.
|
|
354
|
+
|
|
355
|
+
| Metric | Unit | Description |
|
|
356
|
+
|--------|------|-------------|
|
|
357
|
+
| `node_cpu_hourly_cost` | USD / core-hour | Node CPU unit price |
|
|
358
|
+
| `node_ram_hourly_cost` | USD / GiB-hour | Node memory unit price |
|
|
359
|
+
| `container_cpu_allocation` | cores | Container CPU allocation |
|
|
360
|
+
| `container_memory_allocation_bytes` | bytes | Container memory allocation |
|
|
361
|
+
| `pod_pvc_allocation` | bytes | Pod PVC allocation |
|
|
362
|
+
| `pv_hourly_cost` | USD / GiB-hour | Volume unit price |
|
|
363
|
+
|
|
364
|
+
Source: <https://opencost.io/docs/integrations/metrics/>. Label-based tenant/workload totals require explicit API aggregation or verified recording rules.
|
|
365
|
+
|
|
366
|
+
### 8.2 Scrape Configuration
|
|
367
|
+
|
|
368
|
+
```yaml
|
|
369
|
+
receivers:
|
|
370
|
+
prometheus:
|
|
371
|
+
config:
|
|
372
|
+
scrape_configs:
|
|
373
|
+
- job_name: opencost
|
|
374
|
+
scrape_interval: 60s
|
|
375
|
+
static_configs:
|
|
376
|
+
- targets: ["opencost.opencost.svc.cluster.local:9003"]
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Cross-ref `cost.md` for the full FinOps unit-economics model, per-tenant cost attribution, and chargeback/showback patterns.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 9. Cardinality Budget
|
|
384
|
+
|
|
385
|
+
Cross-ref `../meta-observability.md §Section C Cardinality Guardrails` for full detail and remediation procedures.
|
|
386
|
+
|
|
387
|
+
### 9.1 Per-Service Budget
|
|
388
|
+
|
|
389
|
+
Set a hard budget per service, enforced via alert at 80% of budget:
|
|
390
|
+
|
|
391
|
+
```promql
|
|
392
|
+
# Alert: service approaching 5000-series budget
|
|
393
|
+
count({job="my-service"}) > 4000
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### 9.2 Forbidden Labels (Never use as metric labels)
|
|
397
|
+
|
|
398
|
+
| Label | Reason |
|
|
399
|
+
|-------|--------|
|
|
400
|
+
| `user.id` | Unbounded; one series per user |
|
|
401
|
+
| `request.id` | One series per request; instant explosion |
|
|
402
|
+
| `trace.id` | One series per trace |
|
|
403
|
+
| `url.full` (raw) | Query strings are unbounded |
|
|
404
|
+
| `error.message` | Free-text; unbounded cardinality |
|
|
405
|
+
|
|
406
|
+
### 9.3 Tenant Cap
|
|
407
|
+
|
|
408
|
+
`tenant.id` label is allowed with a hard cap: top-N explicit tenants (e.g., 1000), all others mapped to label value `"other"`. Never create a new metric name per tenant; this bypasses TSDB cardinality controls entirely (anti-pattern listed in Section 12).
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## 10. Long-Term Storage Backends
|
|
413
|
+
|
|
414
|
+
Prometheus-compatible TSDBs for metrics retention beyond 15 days:
|
|
415
|
+
|
|
416
|
+
| Backend | CNCF Status | Key Characteristic | Typical Retention |
|
|
417
|
+
|---------|-------------|--------------------|-------------------|
|
|
418
|
+
| Prometheus | CNCF Graduated | Local storage, no HA by default | 15d (short-term) |
|
|
419
|
+
| Thanos | CNCF Incubating | Object storage long-term; Prometheus sidecar model | 1y+ |
|
|
420
|
+
| Cortex | CNCF Incubating | Multi-tenant Prometheus; horizontally scalable | 1y+ |
|
|
421
|
+
| Grafana Mimir | Not CNCF | Grafana Labs fork of Cortex; production-grade | 1y+ |
|
|
422
|
+
| VictoriaMetrics | Not CNCF | High-performance; efficient storage compression | 1y+ |
|
|
423
|
+
|
|
424
|
+
Cross-ref `../vendor-categories.md §TSDB / Long-term Metrics` for selection guidance per workload size and multi-tenancy requirements.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## 11. Matrix Coverage (metrics column)
|
|
429
|
+
|
|
430
|
+
This table maps the metrics signal cells from `../matrix.md` for quick navigation.
|
|
431
|
+
|
|
432
|
+
| Layer | Boundary | Coverage | Detail |
|
|
433
|
+
|-------|----------|----------|--------|
|
|
434
|
+
| L3-network | multi-tenant | PASS | Per-tenant VPC flow byte/packet counters |
|
|
435
|
+
| L3-network | cross-application | PASS | Inter-VPC/peering flow metrics |
|
|
436
|
+
| L4-transport | multi-tenant | PASS | Per-tenant TCP retransmit rate, RTT histograms via eBPF |
|
|
437
|
+
| L4-transport | cross-application | PASS | Cross-service TCP RTT and retransmit metrics via eBPF |
|
|
438
|
+
| mesh | multi-tenant | PASS | Per-tenant RED from Envoy telemetry; `tenant.id` via baggage |
|
|
439
|
+
| mesh | cross-application | PASS | Cross-service RED metrics at mesh proxy; topology mapping |
|
|
440
|
+
| mesh | slo | PASS | Request rate and error rate as primary SLI sources |
|
|
441
|
+
| mesh | release | PASS | Request split metrics for canary traffic (Flagger/Argo Rollouts) |
|
|
442
|
+
| L7-application | multi-tenant | PASS | Per-tenant RED + custom business metrics with `tenant.id` |
|
|
443
|
+
| L7-application | cross-application | PASS | Inter-service histograms with `service.name` + `service.peer.name` |
|
|
444
|
+
| L7-application | slo | PASS | SLI metric computation; SLO targets in OpenSLO YAML |
|
|
445
|
+
| L7-application | release | PASS | Release marker; `service.version` label for before/after delta |
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## 12. Anti-Patterns
|
|
450
|
+
|
|
451
|
+
These are candidates for `../anti-patterns.md §Section B Cardinality & Cost`:
|
|
452
|
+
|
|
453
|
+
| Anti-pattern | Description | Correction |
|
|
454
|
+
|--------------|-------------|------------|
|
|
455
|
+
| `user.id` as metric label | Creates one series per user; TSDB storage explosion | Use `user.tier` or aggregated cohort label |
|
|
456
|
+
| New metric name per tenant | `http_requests_total_tenant_acme` bypasses cardinality controls | Use `http_requests_total{tenant="acme"}` with top-N cap |
|
|
457
|
+
| Summary for cross-service aggregation | Client-side quantiles cannot be merged across replicas | Replace with Histogram + `histogram_quantile` at query time |
|
|
458
|
+
| Healthcheck not tied to underlying SLI | `/healthz` returns 200 regardless of dependency health | Emit `service_health_status{check="db"} 0` when unhealthy; wire into SLI |
|
|
459
|
+
| Raw `url.full` label | Query strings are unbounded; `?token=...` leaks secrets | Use `http.route` (normalized); apply `replace_pattern` in Collector |
|
|
460
|
+
| Histogram with default bucket boundaries | Default millisecond buckets are meaningless for second-scale requests | Set explicit bucket boundaries per instrument matching the expected value range |
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Cross-References
|
|
465
|
+
|
|
466
|
+
| Topic | File |
|
|
467
|
+
|-------|------|
|
|
468
|
+
| SLO policy, error budget, burn-rate alerts | `../boundaries/slo.md` |
|
|
469
|
+
| Full FinOps / unit economics | `cost.md` |
|
|
470
|
+
| Cardinality guardrails and remediation | `../meta-observability.md §Section C` |
|
|
471
|
+
| Collector two-tier topology (DaemonSet + gateway) | `../transport/collector-topology.md` |
|
|
472
|
+
| OTel spec and semconv stability tiers | `../standards.md` |
|
|
473
|
+
| Anti-patterns (Section B) | `../anti-patterns.md` |
|
|
474
|
+
| Vendor TSDB selection | `../vendor-categories.md §TSDB / Long-term Metrics` |
|
|
475
|
+
| Full matrix coverage (all signals) | `../matrix.md` |
|
|
476
|
+
| Logs signal | `logs.md` |
|
|
477
|
+
| Traces signal | `traces.md` |
|
|
478
|
+
| Profiles signal | `profiles.md` |
|