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,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
otel_spec: "1.x (stable API/SDK)"
|
|
3
|
+
otel_semconv: "1.43.0 (2026-07)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Observability Agent - Execution Protocol
|
|
7
|
+
|
|
8
|
+
## Step 0: Parse Query
|
|
9
|
+
|
|
10
|
+
1. **Extract flags** from the query string:
|
|
11
|
+
- `--setup`, `--migrate`, `--investigate`, `--alert`, `--trace`, `--tune`, `--route`: force specific intent
|
|
12
|
+
- `--strict`: require Stable semconv only; reject Development/Experimental attributes
|
|
13
|
+
- `--multi-tenant`, `--multi-cloud`: force boundary dimension to `multi-tenant`
|
|
14
|
+
- `--layer=L3|L4|mesh|L7`: force specific layer focus
|
|
15
|
+
- `--signal=metrics|logs|traces|profiles|cost|audit|privacy`: force signal focus
|
|
16
|
+
2. **Detect keywords** (Korean and English) against `resources/intent-rules.md` trigger list
|
|
17
|
+
3. **Extract ambient context** from user message or project files:
|
|
18
|
+
- Target platform: k8s, serverless (Lambda/Cloud Run), VM, bare metal
|
|
19
|
+
- Scale tier: single-service, multi-service, multi-region
|
|
20
|
+
- Compliance requirements: SOC2, ISO 27001, GDPR, PIPA
|
|
21
|
+
4. **Log** resolved flags, detected language, and ambient context for transparency
|
|
22
|
+
|
|
23
|
+
## Step 1: Classify Intent
|
|
24
|
+
|
|
25
|
+
1. If a flag is present → use that intent directly; skip keyword matching
|
|
26
|
+
2. If no flag → apply keyword pattern matching from `resources/intent-rules.md`
|
|
27
|
+
3. If ambiguous, choose the route best supported by the request; inspect available context before asking for missing information. Do not preload two playbooks by default.
|
|
28
|
+
4. **Sparse-context gate**: even when an intent is matched (score ≥ 1), before proceeding to Step 2 check that ambient context is sufficient for the chosen intent. Minimum required context per intent:
|
|
29
|
+
- `investigate`: service name OR symptom category (error code, metric name) OR time window
|
|
30
|
+
- `setup` / `migrate`: target platform (k8s/serverless/VM) OR language/framework
|
|
31
|
+
- `alert`: SLI target or service name
|
|
32
|
+
- `trace`: at least one boundary hint (service hop, mesh, cloud)
|
|
33
|
+
- `tune`: signal type (metrics/logs/traces) OR problem (cost/cardinality/MTU)
|
|
34
|
+
- `route`: tenant OR region OR cloud axis
|
|
35
|
+
|
|
36
|
+
If the minimum is not present, inspect available project context first. Ask only for information that affects the next decision and cannot be recovered locally; continue independent inspection while waiting, following the shared execution policy.
|
|
37
|
+
5. Log selected intent and whether selection was `flag` or `auto`, plus any clarification requested
|
|
38
|
+
|
|
39
|
+
Intent vocabulary:
|
|
40
|
+
|
|
41
|
+
| Intent | Meaning |
|
|
42
|
+
|--------|---------|
|
|
43
|
+
| `setup` | First-time instrumentation or pipeline deployment |
|
|
44
|
+
| `migrate` | Moving from a deprecated or legacy tool |
|
|
45
|
+
| `investigate` | Incident analysis or anomaly root-cause |
|
|
46
|
+
| `alert` | SLO burn-rate or threshold alert authoring |
|
|
47
|
+
| `trace` | Distributed trace propagation and context design |
|
|
48
|
+
| `tune` | Transport, cardinality, sampling, or collector optimization |
|
|
49
|
+
| `route` | Signal routing, tenant isolation, or topology design |
|
|
50
|
+
|
|
51
|
+
## Step 2: Matrix Navigation
|
|
52
|
+
|
|
53
|
+
1. Based on (intent × layer × boundary × signal), identify relevant cells in `resources/matrix.md`
|
|
54
|
+
2. Select one primary intent guide and only the relevant rows or sections for matching `PASS` or `PARTIAL` cells. These describe documentation coverage, not successful verification of the target system.
|
|
55
|
+
3. Flag any N/A cells the user is asking about; redirect to an alternative dimension rather than producing a stub answer
|
|
56
|
+
4. Record the active (layer, boundary, signal) triple for use in Step 6 output header
|
|
57
|
+
|
|
58
|
+
## Step 3: Route Dispatch
|
|
59
|
+
|
|
60
|
+
Dispatch based on intent. Use the table below as the primary routing map, then apply intent-specific detail.
|
|
61
|
+
|
|
62
|
+
| Intent | Primary resource | Fallback |
|
|
63
|
+
|--------|-----------------|---------|
|
|
64
|
+
| `setup` | `resources/vendor-categories.md` → vendor-owned skill | `resources/standards.md` (OTel semconv) |
|
|
65
|
+
| `migrate` | Current upstream migration docs + `resources/vendor-categories.md` log-pipeline section | OTel Collector bridge config |
|
|
66
|
+
| `investigate` | `resources/incident-forensics.md` (MRA + 6-dim localization) | `resources/signals/traces.md` + `resources/signals/logs.md` |
|
|
67
|
+
| `alert` | `resources/boundaries/slo.md` (burn-rate rules) | `resources/observability-as-code.md` |
|
|
68
|
+
| `trace` | `resources/boundaries/cross-application.md` (propagator matrix) | `resources/layers/mesh.md` (zero-code auto-instr) |
|
|
69
|
+
| `tune` | `resources/transport/` (4 files; see below) | `resources/meta-observability.md` (cardinality guardrails) |
|
|
70
|
+
| `route` | `resources/boundaries/multi-tenant.md` + `resources/transport/collector-topology.md` | `resources/boundaries/cross-application.md` |
|
|
71
|
+
|
|
72
|
+
### setup intent
|
|
73
|
+
- Consult `resources/vendor-categories.md`: select category based on constraints (OSS vs commercial, high-cardinality, FinOps, profiling)
|
|
74
|
+
- Delegate to vendor-owned skill when one is installed (e.g., getsentry/sentry-sdk-setup, honeycombio/agent-skill, Dash0 otel-instrumentation, Datadog Labs dd-apm)
|
|
75
|
+
- If no matching vendor skill is installed → guide user to `/oma-search --docs` for vendor documentation
|
|
76
|
+
|
|
77
|
+
### migrate intent
|
|
78
|
+
- Fluentd as source → verify current upstream support and plugin compatibility; compare Fluent Bit and OTel Collector only against the requested migration requirements
|
|
79
|
+
- Legacy APM as source → provide OTel bridge config patterns; reference `resources/vendor-categories.md §(h)`
|
|
80
|
+
|
|
81
|
+
### investigate intent
|
|
82
|
+
- Invoke `resources/incident-forensics.md` full playbook (MRA + 6-dimension narrowing: code / service / layer / host / region / infra)
|
|
83
|
+
- Cross-reference signal files based on symptom category (latency, error rate, saturation, data loss)
|
|
84
|
+
|
|
85
|
+
### alert intent
|
|
86
|
+
- Use `resources/boundaries/slo.md` for burn-rate calculation and multi-window alert rules
|
|
87
|
+
- Use `resources/observability-as-code.md` for PrometheusRule CRD and Alertmanager routing tree
|
|
88
|
+
|
|
89
|
+
### trace intent
|
|
90
|
+
- Use `resources/boundaries/cross-application.md` for W3C Trace Context propagator matrix across cloud providers
|
|
91
|
+
- Use `resources/layers/mesh.md` for zero-code auto-instrumentation via service mesh
|
|
92
|
+
|
|
93
|
+
### tune intent
|
|
94
|
+
- `resources/transport/udp-statsd-mtu.md`: UDP payload size thresholds and fragmentation risk
|
|
95
|
+
- `resources/transport/otlp-grpc-vs-http.md`: protocol selection by environment and firewall constraints
|
|
96
|
+
- `resources/transport/collector-topology.md`: DaemonSet vs sidecar vs gateway deployment patterns
|
|
97
|
+
- `resources/transport/sampling-recipes.md`: head-based vs tail-based sampling policy selection
|
|
98
|
+
|
|
99
|
+
### route intent
|
|
100
|
+
- `resources/boundaries/multi-tenant.md`: tenant isolation strategies (attribute-based, pipeline-based, storage-based)
|
|
101
|
+
- `resources/transport/collector-topology.md`: routing topology for signal fan-out and load balancing
|
|
102
|
+
|
|
103
|
+
## Step 4: Collect Reference Material
|
|
104
|
+
|
|
105
|
+
1. Load the primary guide selected in Step 3. Add a transport, boundary, or signal section only when a concrete question requires it; do not read all 33 reference documents
|
|
106
|
+
2. Verify current official project documentation and CNCF status yourself when support or maturity affects the decision. Do not treat an old timestamp or version pin as proof of current status
|
|
107
|
+
3. For commercial vendor references, check whether a vendor-owned skill is installed locally before suggesting manual setup
|
|
108
|
+
|
|
109
|
+
## Step 5: Validate Against Constraints
|
|
110
|
+
|
|
111
|
+
1. Consult the relevant category in `resources/anti-patterns.md` when validating the proposed design; do not preload the full catalog
|
|
112
|
+
2. Consult only the applicable sections of `resources/checklist.md`; report executed checks separately from proposed checks
|
|
113
|
+
3. For setup, configuration changes, or label/cardinality design, use the relevant preview in `resources/meta-observability.md` and flag unbounded dimensions. For investigation or routing, load it only when pipeline health or cardinality is implicated
|
|
114
|
+
4. If `--strict` flag is set → reject any semconv attribute in Development or Experimental stability tier; cite stable alternative
|
|
115
|
+
5. If PII is involved → apply `resources/signals/privacy.md` redaction and sampling-aware baggage rules at collection, not only at storage
|
|
116
|
+
6. If `--multi-tenant` or `--multi-cloud` → apply `resources/boundaries/multi-tenant.md` isolation rules; verify data residency is explicit
|
|
117
|
+
|
|
118
|
+
## Step 6: Present
|
|
119
|
+
|
|
120
|
+
Format output as:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Intent: {intent} Mode: {auto|flag}
|
|
124
|
+
Layer: {L3|L4|mesh|L7} Boundary: {multi-tenant|cross-application|slo|release} Signal: {metrics|logs|traces|profiles|cost|audit|privacy}
|
|
125
|
+
|
|
126
|
+
Primary recommendation:
|
|
127
|
+
- {file:section} — {1-line rationale}
|
|
128
|
+
|
|
129
|
+
Secondary considerations:
|
|
130
|
+
- {file:section} — {caveat or anti-pattern hit}
|
|
131
|
+
|
|
132
|
+
Delegation target:
|
|
133
|
+
- {vendor-owned skill name, or /oma-search command}
|
|
134
|
+
|
|
135
|
+
Checklist items to verify:
|
|
136
|
+
- [ ] {item from checklist.md}
|
|
137
|
+
- [ ] {item}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Example output for "setup OTel stack on k8s":
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Intent: setup Mode: auto
|
|
144
|
+
Layer: L7 + mesh Boundary: cross-application Signal: metrics + logs + traces
|
|
145
|
+
|
|
146
|
+
Primary recommendation:
|
|
147
|
+
- resources/transport/collector-topology.md §Two-tier hybrid — DaemonSet + Deployment gateway
|
|
148
|
+
- resources/vendor-categories.md §OSS Full-Stack — Grafana LGTM+ (2026-Q2)
|
|
149
|
+
|
|
150
|
+
Secondary considerations:
|
|
151
|
+
- resources/transport/sampling-recipes.md §Tail-based — consistent routing via loadbalancing exporter
|
|
152
|
+
- resources/anti-patterns.md §Section C — avoid sidecar as default on k8s; use DaemonSet
|
|
153
|
+
|
|
154
|
+
Delegation target:
|
|
155
|
+
- No single vendor skill (OSS self-host); use oma-tf-infra for Terraform + /oma-search for component docs
|
|
156
|
+
|
|
157
|
+
Checklist items to verify:
|
|
158
|
+
- [ ] memory_limiter processor placed before batch processor in pipeline
|
|
159
|
+
- [ ] NTP synced on all nodes (< 100 ms drift)
|
|
160
|
+
- [ ] cardinality budget set per service before enabling high-cardinality labels
|
|
161
|
+
- [ ] Source support and plugin compatibility checked before selecting a migration path
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## On Error
|
|
165
|
+
|
|
166
|
+
See `resources/checklist.md §7 Recovery` for recovery steps.
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
---
|
|
2
|
+
otel_spec: "1.x (stable API/SDK)"
|
|
3
|
+
otel_semconv: "1.43.0 (2026-07)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Incident Forensics Playbook
|
|
7
|
+
|
|
8
|
+
## 1. Purpose
|
|
9
|
+
|
|
10
|
+
**Goal**: given a production incident, locate root cause across 6 dimensions; code, service, layer, host, region, infra; in under 15 minutes, using the MELT+P+cost+audit+privacy signals defined across this skill tree.
|
|
11
|
+
|
|
12
|
+
The 6-dimension narrowing flow ties every signal file together through one executable playbook. No signal exists in isolation; correlation across signals is what separates diagnosis from guesswork.
|
|
13
|
+
|
|
14
|
+
**In scope**: any incident surfaced by an alert, a user report, or an anomaly detected in metrics, traces, or logs.
|
|
15
|
+
**Out of scope**: incident response workflow (on-call rotation, escalation, postmortem tooling); use PagerDuty, OpsGenie, or Grafana OnCall for those.
|
|
16
|
+
|
|
17
|
+
Cross-skill entry point: `oma-debug` invokes this playbook on failure, pulling traces and logs by `request_id`.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Minimum Required Attributes (MRA)
|
|
22
|
+
|
|
23
|
+
Every span, log record, and metric data point MUST carry the attributes below before reaching production. Missing attributes break the narrowing flow at the step that depends on them.
|
|
24
|
+
|
|
25
|
+
Semconv stability tiers follow `resources/standards.md §3`. Attributes marked Stable are safe for production SLOs and alerting. Attributes marked Development must not be used as SLO inputs.
|
|
26
|
+
|
|
27
|
+
### 2.1 Resource attributes: every signal
|
|
28
|
+
|
|
29
|
+
These attributes identify the workload that emitted the signal. They must be set on the OTel Resource, not on individual spans or log records.
|
|
30
|
+
|
|
31
|
+
| Attribute | Semconv group | Stability | Example value |
|
|
32
|
+
|-----------|--------------|-----------|---------------|
|
|
33
|
+
| `service.name` | `service.*` | Stable | `payment-service` |
|
|
34
|
+
| `service.namespace` | `service.*` | Stable | `checkout` |
|
|
35
|
+
| `service.version` | `service.*` | Stable | `v2.4.1` |
|
|
36
|
+
| `deployment.environment` | `deployment.*` | Stable | `prod` |
|
|
37
|
+
| `cloud.provider` | `cloud.*` | Stable | `aws` |
|
|
38
|
+
| `cloud.region` | `cloud.*` | Stable | `ap-northeast-2` |
|
|
39
|
+
| `cloud.availability_zone` | `cloud.*` | Stable | `ap-northeast-2a` |
|
|
40
|
+
| `host.id` | `host.*` | Stable | `i-0a1b2c3d4e5f` |
|
|
41
|
+
| `k8s.pod.name` | `k8s.*` | Stable | `payment-7d9f4b-xk2rp` |
|
|
42
|
+
| `k8s.node.name` | `k8s.*` | Stable | `ip-10-0-1-45.ec2.internal` |
|
|
43
|
+
| `k8s.cluster.name` | `k8s.*` | Stable | `prod-ap2-cluster` |
|
|
44
|
+
| `container.id` | `container.*` | Stable | `a3f7c2d1e9b0...` (first 12 chars) |
|
|
45
|
+
|
|
46
|
+
Note: for non-Kubernetes hosts use `host.id`; for Kubernetes workloads set both `k8s.pod.name` and `k8s.node.name`. `host.id` is not redundant; it maps to the underlying EC2/GCE instance for host-level pivot.
|
|
47
|
+
|
|
48
|
+
### 2.2 Error span additional attributes
|
|
49
|
+
|
|
50
|
+
Error spans (those where `status.code = ERROR`) MUST additionally carry code and exception attributes to enable the Code dimension pivot.
|
|
51
|
+
|
|
52
|
+
<!-- oma-docs:ignore-start -->
|
|
53
|
+
| Attribute | Semconv group | Stability | Example value |
|
|
54
|
+
|-----------|--------------|-----------|---------------|
|
|
55
|
+
| `code.function.name` | `code.*` | Stable | `processPayment` |
|
|
56
|
+
| `code.file.path` | `code.*` | Stable | `src/payments/processor.ts` |
|
|
57
|
+
| `code.line.number` | `code.*` | Stable | `287` |
|
|
58
|
+
| `exception.type` | `exception.*` | Stable | `TimeoutException` |
|
|
59
|
+
| `exception.message` | `exception.*` | Stable | `Redis pool exhausted after 5000ms` |
|
|
60
|
+
| `exception.stacktrace` | `exception.*` | Stable | full stack trace string |
|
|
61
|
+
<!-- oma-docs:ignore-end -->
|
|
62
|
+
|
|
63
|
+
Set these via the OTel SDK `span.recordException(e)` call, which populates all three `exception.*` attributes atomically.
|
|
64
|
+
|
|
65
|
+
> **Migration note (semconv 1.40+)**: recording exceptions as span events is deprecated in favor of exception LogRecords (`OTEL_SEMCONV_EXCEPTION_SIGNAL_OPT_IN=logs|logs/dup`). Default SDK behavior still emits span events, and log-based exceptions can be routed back to span events at the SDK layer, so this pivot keeps working. For instrumentation that has migrated, run the same pivot by joining exception LogRecords on `trace_id`/`span_id` (§2.3).
|
|
66
|
+
|
|
67
|
+
### 2.3 Structured log mandatory fields
|
|
68
|
+
|
|
69
|
+
Every structured log record MUST carry these correlation keys. Without `trace_id`, log-trace join is impossible. Without `request_id`, user-support correlation is impossible.
|
|
70
|
+
|
|
71
|
+
| Field | Source | Example value |
|
|
72
|
+
|-------|--------|---------------|
|
|
73
|
+
| `trace_id` | OTel SDK (current span context) | `4bf92f3577b34da6a3ce929d0e0e4736` |
|
|
74
|
+
| `span_id` | OTel SDK (current span context) | `00f067aa0ba902b7` |
|
|
75
|
+
| `request_id` | `x-request-id` header (injected at API gateway) | `req_7Kp2mNxQr` |
|
|
76
|
+
| `tenant.id` | W3C Baggage propagation (if multi-tenant) | `tnt_A9cBx3` |
|
|
77
|
+
|
|
78
|
+
`tenant.id` is required only for multi-tenant services. Propagate via W3C Baggage per `resources/standards.md §W3C Baggage`. Do NOT carry user email or session tokens in baggage; see anti-patterns below.
|
|
79
|
+
|
|
80
|
+
### 2.4 Propagation requirement
|
|
81
|
+
|
|
82
|
+
W3C `traceparent` MUST propagate through every outbound HTTP and gRPC call. Stripping it silently is anti-pattern #1 in `resources/anti-patterns.md`. Verify propagation at every service boundary by checking that `trace_id` is consistent across services in a single request's log stream.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 3. Six-Dimension Narrowing Flow
|
|
87
|
+
|
|
88
|
+
Execute the steps in order. Each step narrows the blast radius before the next. Do not skip steps; jumping to Code before confirming Region wastes time on red herrings.
|
|
89
|
+
|
|
90
|
+
**Time budget**: 15 minutes total. Suggested split: symptom capture (1 min), trace_id acquisition (2 min), dimension pivots (8 min), cross-signal validation (3 min), release correlation + action (1 min).
|
|
91
|
+
|
|
92
|
+
### Step 1: Symptom capture
|
|
93
|
+
|
|
94
|
+
Collect the following before touching any query tool:
|
|
95
|
+
|
|
96
|
+
- **Time window**: incident start (± 2 min buffer) and current time.
|
|
97
|
+
- **Initial clue**: which of these does the reporter provide?
|
|
98
|
+
- `trace_id`: fastest path; jump directly to Step 3.
|
|
99
|
+
- `request_id`: search logs: `request_id = <value>` → extract `trace_id`.
|
|
100
|
+
- User/tenant identifier: search logs: `tenant.id = <value>` in the time window.
|
|
101
|
+
- Alert only: proceed to Step 2 via metrics.
|
|
102
|
+
- **Symptom class**: error rate spike, latency spike, OOM/crash, or silent data corruption?
|
|
103
|
+
|
|
104
|
+
### Step 2: Acquire trace_id
|
|
105
|
+
|
|
106
|
+
If no `trace_id` was provided in Step 1, acquire one from metrics via exemplar:
|
|
107
|
+
|
|
108
|
+
1. Open the alerting metric (e.g., `http_server_request_duration_seconds` p99 or `http_requests_total` error rate) for the incident time window.
|
|
109
|
+
2. Locate a data point near the spike peak. Most modern metric backends (Grafana Mimir, Prometheus with exemplars, Datadog APM metrics) attach a trace exemplar to high-value data points.
|
|
110
|
+
3. Click the exemplar → copy the `trace_id`.
|
|
111
|
+
4. If the backend does not expose exemplars, filter error logs by `deployment.environment = prod` and the time window, then extract `trace_id` from the first matching log record.
|
|
112
|
+
|
|
113
|
+
### Step 3: Narrow by dimension (coarse to fine)
|
|
114
|
+
|
|
115
|
+
With `trace_id` in hand, execute pivots in this order:
|
|
116
|
+
|
|
117
|
+
#### 3a. Region / Infra (`cloud.region`, `k8s.cluster.name`)
|
|
118
|
+
|
|
119
|
+
Filter the trace or log stream by region first. Multi-region incidents are rarer than single-region ones; confirming scope is cheap.
|
|
120
|
+
|
|
121
|
+
- Query: filter spans or logs where `cloud.region != ap-northeast-2` (or whichever region the alert fired for). If traces from other regions are healthy, the blast radius is single-region.
|
|
122
|
+
- If the issue is infra-wide (all regions): pivot to `k8s.cluster.name` to check whether a specific cluster is affected.
|
|
123
|
+
|
|
124
|
+
#### 3b. Server (`host.id`, `k8s.pod.name`, `k8s.node.name`)
|
|
125
|
+
|
|
126
|
+
Within the confirmed region, check whether the failure is pod-wide or node-wide.
|
|
127
|
+
|
|
128
|
+
- A single pod failing repeatedly suggests a pod-level issue (OOM, file descriptor leak, bad canary rollout to that pod).
|
|
129
|
+
- Multiple pods on the same `k8s.node.name` suggests a node-level issue (disk pressure, noisy neighbor, kernel panic).
|
|
130
|
+
- Uniformly distributed across nodes suggests a service-wide or downstream issue.
|
|
131
|
+
|
|
132
|
+
#### 3c. Service (`service.name`, `service.version`)
|
|
133
|
+
|
|
134
|
+
With the server scope established, identify the service boundary where errors originate.
|
|
135
|
+
|
|
136
|
+
- Inspect the trace waterfall: find the earliest span where `status.code = ERROR`.
|
|
137
|
+
- Record `service.name` and `service.version` from that span's resource attributes.
|
|
138
|
+
- If `service.version` changed recently (see Step 5), this is the primary suspect.
|
|
139
|
+
|
|
140
|
+
#### 3d. Layer (`span.kind`, layer classification)
|
|
141
|
+
|
|
142
|
+
Classify the failing span's network layer using `span.kind` and span name patterns:
|
|
143
|
+
|
|
144
|
+
| `span.kind` value | Layer | Typical next pivot |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| `SERVER` or `CLIENT` with HTTP attributes | L7 application | code.function.name |
|
|
147
|
+
| `CLIENT` with `db.*` attributes | L7 DB call | traces.md DB patterns |
|
|
148
|
+
| `INTERNAL` with `messaging.*` | L7 messaging | check DLQ |
|
|
149
|
+
| eBPF-sourced span (Beyla/Pixie) | L4 transport | TCP retransmit metrics |
|
|
150
|
+
| Envoy/Istio proxy span | mesh | layers/mesh.md |
|
|
151
|
+
|
|
152
|
+
For L3/L4 root causes (PMTUD black hole, TCP retransmit storm), the L7 error manifests as a connection timeout. The trace will show a CLIENT span with no child spans and a `server.address` pointing to the downstream. Pivot to L3/L4 metrics from there.
|
|
153
|
+
|
|
154
|
+
#### 3e. Code (`code.function.name`, `code.file.path`, `code.line.number`, `exception.stacktrace`)
|
|
155
|
+
|
|
156
|
+
On the failing span, read the error attributes set by MRA §2.2:
|
|
157
|
+
|
|
158
|
+
- `exception.type` and `exception.message` give the immediate cause.
|
|
159
|
+
- `exception.stacktrace` gives the call chain.
|
|
160
|
+
- `code.function.name` + `code.file.path` + `code.line.number` identify the exact source location without needing to search the codebase.
|
|
161
|
+
|
|
162
|
+
Cross-check: if `exception.stacktrace` points to a library call (e.g., a Redis client timeout), the root cause is likely downstream resource exhaustion, not a code bug; continue to cross-signal validation.
|
|
163
|
+
|
|
164
|
+
### Step 4: Cross-signal validation
|
|
165
|
+
|
|
166
|
+
With the failing span identified, validate the hypothesis across all available signals. Correlation is mandatory; without it, you may fix the wrong thing.
|
|
167
|
+
|
|
168
|
+
| Signal | What to check | File reference |
|
|
169
|
+
|--------|--------------|----------------|
|
|
170
|
+
| metrics | Error rate and latency p99 trend at the confirmed `service.name` + `cloud.region`. Does the scale match the alert? | `signals/metrics.md` |
|
|
171
|
+
| traces | Full trace waterfall: where does latency accumulate? Where does `status.code` first become ERROR? | `signals/traces.md` |
|
|
172
|
+
| logs | Filter by `trace_id` across all services. Look for WARNING or ERROR logs from downstream services within ±5 seconds of the failing span's start time. | `signals/logs.md` |
|
|
173
|
+
| profiles | If available (Parca/Pyroscope): pull the CPU flame graph for the pod in the incident window. Look for unexpectedly hot functions or heap growth. | `signals/profiles.md` |
|
|
174
|
+
|
|
175
|
+
All four signals should converge on the same root cause. If they diverge, re-examine the time window alignment (NTP drift is a common cause; see anti-patterns below).
|
|
176
|
+
|
|
177
|
+
### Step 5: Release correlation
|
|
178
|
+
|
|
179
|
+
Compare the incident start time to recent deployments of the suspected `service.name`:
|
|
180
|
+
|
|
181
|
+
| Window | Confidence of correlation |
|
|
182
|
+
|--------|--------------------------|
|
|
183
|
+
| `service.version` changed ≤ 30 minutes before incident | High; treat as primary hypothesis |
|
|
184
|
+
| ≤ 2 hours before incident | Medium; check changelog for risky changes |
|
|
185
|
+
| ≤ 24 hours before incident | Low; consider, but rule out other causes first |
|
|
186
|
+
|
|
187
|
+
Release markers must be present as structured log events or metric annotations carrying `service.version`, `deployment.environment`, and the deployment SHA (propagated via `oma-scm`). Without release markers, this step is blind; see anti-patterns below.
|
|
188
|
+
|
|
189
|
+
### Step 6: Recover or rollback
|
|
190
|
+
|
|
191
|
+
Based on Steps 1-5:
|
|
192
|
+
|
|
193
|
+
- **Root cause identified, fix available**: deploy hotfix → verify metric recovery in the same time window.
|
|
194
|
+
- **Root cause identified, fix not immediate**: rollback to previous `service.version` → verify metric recovery.
|
|
195
|
+
- **Root cause identified in downstream service**: escalate to owning team with the `trace_id`, the failing span attributes, and the cross-signal evidence bundle.
|
|
196
|
+
- **Root cause unresolved after 15 minutes**: escalate with the narrowed blast radius (region/host/service confirmed) and all evidence collected so far. Do not continue solo investigation beyond this threshold without escalation.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 4. Vendor-Specific Query Examples
|
|
201
|
+
|
|
202
|
+
Given a `trace_id` of `4bf92f3577b34da6a3ce929d0e0e4736`, the equivalent query in each backend:
|
|
203
|
+
|
|
204
|
+
| Vendor | Interface | Query syntax |
|
|
205
|
+
|--------|-----------|-------------|
|
|
206
|
+
| Honeycomb | Query Builder | `trace:<id>` in the trace panel |
|
|
207
|
+
| Datadog APM | APM / Logs | `@trace_id:4bf92f3577b34da6a3ce929d0e0e4736` |
|
|
208
|
+
| Grafana Tempo | TraceQL | `{ trace:id = "4bf92f3577b34da6a3ce929d0e0e4736" }` |
|
|
209
|
+
| Jaeger | HTTP API | `GET /api/traces/4bf92f3577b34da6a3ce929d0e0e4736` |
|
|
210
|
+
| Sentry | Search | `trace_id:4bf92f3577b34da6a3ce929d0e0e4736` in Issues or Performance |
|
|
211
|
+
| SigNoz / OSS OTel | UI filter | trace_id filter field in Traces explorer |
|
|
212
|
+
| Elastic APM | Kibana | `trace.id: "4bf92f3577b34da6a3ce929d0e0e4736"` in Discover or APM |
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
# Honeycomb query builder (BubbleUp / Trace view)
|
|
216
|
+
trace:4bf92f3577b34da6a3ce929d0e0e4736
|
|
217
|
+
|
|
218
|
+
# Datadog logs query (also works in APM trace search)
|
|
219
|
+
@trace_id:4bf92f3577b34da6a3ce929d0e0e4736
|
|
220
|
+
|
|
221
|
+
# Grafana Tempo — TraceQL
|
|
222
|
+
{ trace:id = "4bf92f3577b34da6a3ce929d0e0e4736" }
|
|
223
|
+
|
|
224
|
+
# Jaeger HTTP API (replace <host> with your Jaeger query host)
|
|
225
|
+
curl http://<host>:16686/api/traces/4bf92f3577b34da6a3ce929d0e0e4736
|
|
226
|
+
|
|
227
|
+
# Elastic (KQL in Discover or APM)
|
|
228
|
+
trace.id: "4bf92f3577b34da6a3ce929d0e0e4736"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
For metric-to-trace pivot via exemplars (Step 2):
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
# Grafana Mimir / Prometheus with exemplars — PromQL
|
|
235
|
+
histogram_quantile(0.99,
|
|
236
|
+
sum by (le, service_name) (
|
|
237
|
+
rate(http_server_request_duration_seconds_bucket{
|
|
238
|
+
deployment_environment="prod",
|
|
239
|
+
cloud_region="ap-northeast-2"
|
|
240
|
+
}[5m])
|
|
241
|
+
)
|
|
242
|
+
)
|
|
243
|
+
# Click a data point spike → exemplar panel shows trace_id link
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
# Datadog — metric to trace pivot
|
|
248
|
+
# In a metric graph, click a spike → "View related traces" opens APM with
|
|
249
|
+
# automatic time filter and service filter applied
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 5. Walkthrough Scenarios
|
|
255
|
+
|
|
256
|
+
### Scenario A: ap-northeast-2 payment service 5xx spike
|
|
257
|
+
|
|
258
|
+
Alert fires: `http_requests_total{status=~"5..", service_name="payment-service", cloud_region="ap-northeast-2"}` error rate crosses 5% burn-rate threshold.
|
|
259
|
+
|
|
260
|
+
1. **Symptom capture**: time window 14:22-14:35 UTC. Alert only; no trace_id provided. Symptom class: error rate spike.
|
|
261
|
+
2. **Acquire trace_id**: open the alerting metric in Grafana Mimir. Click a spike data point at 14:24. Exemplar attached: `trace_id = 9a3f1c8e2b7d4e50a1c3f9d2b8e7a4c0`.
|
|
262
|
+
3. **Region pivot**: filter spans by `cloud.region = ap-northeast-2`. Spans from `ap-southeast-1` are healthy. Blast radius: single region.
|
|
263
|
+
4. **Server pivot**: error spans distributed across 3 of 6 pods, all on `k8s.node.name = ip-10-0-2-11.ec2.internal`. Potential node-level issue; note but continue to service pivot first.
|
|
264
|
+
5. **Service pivot**: earliest ERROR span is `service.name = payment-service`, `service.version = v2.4.1`. Downstream span to `redis-cache` shows CLIENT timeout with no response.
|
|
265
|
+
6. **Layer pivot**: `span.kind = CLIENT`, `db.system = redis`. Layer: L7 DB call. No L3/L4 trace artifacts; this is an application-layer Redis client timeout.
|
|
266
|
+
7. **Code pivot**: `exception.type = TimeoutException`, `exception.message = "Redis pool exhausted after 5000ms"`, `code.function.name = processPayment`, `code.file.path = src/payments/processor.ts`, `code.line.number = 287`.
|
|
267
|
+
8. **Cross-signal validation**:
|
|
268
|
+
- metrics: Redis connection pool saturation metric (`redis_pool_active_connections / redis_pool_max_connections`) at 100% from 14:21 UTC.
|
|
269
|
+
- logs: filter `trace_id = 9a3f1c8e2b7d4e50a1c3f9d2b8e7a4c0`. Log at 14:22: `WARN: connection pool at capacity (256/256)` from `payment-service`.
|
|
270
|
+
- traces: 8 concurrent `processPayment` spans all blocking on Redis CLIENT span; pool exhaustion pattern.
|
|
271
|
+
- profiles: not available for this service (profiling not yet instrumented).
|
|
272
|
+
9. **Release correlation**: `service.version = v2.4.1` deployed at 13:57 UTC; 25 minutes before incident. Release marker log entry found. Changelog shows connection pool size reduced from 512 to 256 in this version.
|
|
273
|
+
10. **Action**: rollback to `v2.4.0`. Error rate drops to baseline within 3 minutes. Hotfix: restore pool size to 512, add `redis_pool_wait_duration_seconds` histogram alert.
|
|
274
|
+
|
|
275
|
+
### Scenario B: single tenant p99 latency spike
|
|
276
|
+
|
|
277
|
+
Alert fires: p99 latency SLO burn-rate for `api-gateway` crosses 2x threshold. Reported by tenant support: `tenant.id = tnt_A9cBx3` experiencing slow responses. All other tenants are healthy.
|
|
278
|
+
|
|
279
|
+
1. **Symptom capture**: time window 09:15-09:45 UTC. Tenant identifier provided: `tnt_A9cBx3`. Symptom class: latency spike, single tenant.
|
|
280
|
+
2. **Acquire trace_id**: search logs for `tenant.id = tnt_A9cBx3` in the window. First matching record: `trace_id = c7b2a1f4e8d3c9b0a2e4f1d7c3b8a5e2`.
|
|
281
|
+
3. **Region pivot**: `cloud.region = us-east-1` (this tenant's home region). Spans from other regions not affected. Blast radius: single region, single tenant.
|
|
282
|
+
4. **Server pivot**: error spans distributed evenly across all pods. Not a node-level issue.
|
|
283
|
+
5. **Service pivot**: latency spike originates in `service.name = tenant-config-service`, `service.version = v1.8.0` (unchanged for 2 weeks; not a release issue).
|
|
284
|
+
6. **Layer pivot**: `span.kind = CLIENT` with `db.system = postgresql`. Layer: L7 DB call.
|
|
285
|
+
7. **Code pivot**: no ERROR status; latency only. `span.duration = 812ms`. Span name: `SELECT tenant_config`. No exception attributes because the query succeeds, just slowly.
|
|
286
|
+
8. **Cross-signal validation**:
|
|
287
|
+
- metrics: `db_client_operation_duration_seconds` p99 for `tenant-config-service` at 800ms. Other services normal.
|
|
288
|
+
- traces: 47 sequential DB CLIENT spans within a single parent SERVER span. Each takes ~17ms. Total: 812ms. Classic N+1 query pattern.
|
|
289
|
+
- logs: `trace_id` filter shows no errors. Log at request start: `tenant.id = tnt_A9cBx3, config_keys_requested = 47`.
|
|
290
|
+
- profiles: Parca flame graph for `tenant-config-service` in the window. `tenantConfigLookup` accounts for 810ms of wall time. Call graph shows a loop issuing individual `findByKey` calls instead of a batch `findByKeys`.
|
|
291
|
+
9. **Release correlation**: no recent deployment. Root cause: N+1 query in `tenantConfigLookup` triggered by `tnt_A9cBx3` having 47 config keys (others have 5-12). The code path was never slow enough to surface with smaller tenants.
|
|
292
|
+
10. **Action**: fix `tenantConfigLookup` to use batch `SELECT ... WHERE key = ANY($1)`. Add a `db_query_count_per_request` histogram alert with threshold > 10 per span. Deploy and verify p99 for `tnt_A9cBx3` drops to < 50ms.
|
|
293
|
+
|
|
294
|
+
Reference: `boundaries/multi-tenant.md` for per-tenant pivot strategy; `signals/profiles.md` for Parca/Pyroscope flamegraph correlation.
|
|
295
|
+
|
|
296
|
+
### Scenario C: OOM crash after deployment
|
|
297
|
+
|
|
298
|
+
Alert fires: pod restart storm on `rendering-service` pods. `k8s.pod.name` shows 3 of 12 pods (25%) restarting with OOMKilled reason. The 3 affected pods are canary instances (Flagger progressive delivery).
|
|
299
|
+
|
|
300
|
+
1. **Symptom capture**: time window 16:40-17:00 UTC. Alert only. Symptom class: OOM/crash on canary pods.
|
|
301
|
+
2. **Acquire trace_id**: OOMKilled pods produce no useful traces after crash. Pivot to release event first.
|
|
302
|
+
3. **Release correlation** (Step 5 first, by exception): release marker log entry at 16:35 UTC: `service.name = rendering-service`, `service.version = v3.1.0`, `deployment.strategy = canary`. 5 minutes before OOM storm; high confidence correlation.
|
|
303
|
+
4. **Region/Server pivot**: `cloud.region = eu-west-1`, `k8s.node.name` spread across 3 different nodes; not a node issue. All 3 OOM pods are on `service.version = v3.1.0`. Stable pods on `v3.0.9` are healthy.
|
|
304
|
+
5. **Layer pivot**: OOM is a host/runtime event, not an application span. No span to inspect. Pivot directly to profiles.
|
|
305
|
+
6. **Cross-signal validation**:
|
|
306
|
+
- metrics: `container_memory_working_set_bytes` for `v3.1.0` pods ramps from 200MB to 1.5GB (container limit) over 18 minutes. `v3.0.9` pods stable at 200MB.
|
|
307
|
+
- traces: no useful traces from crashed pods. Pre-crash traces show `renderTemplate` CLIENT spans with duration increasing over time.
|
|
308
|
+
- logs: pre-crash logs from `v3.1.0` pods: `WARN: template cache size = 412MB at 16:52`. Not present in `v3.0.9` pods.
|
|
309
|
+
- profiles: Pyroscope heap diff between `v3.1.0` (pod alive, approaching limit) and `v3.0.9`. New allocation in `renderTemplate` retaining 400MB; a template object cache introduced in `v3.1.0` is not evicting entries.
|
|
310
|
+
7. **Flagger auto-rollback check**: Flagger's canary analysis `successRate` threshold is 99%. OOMKilled pods were restarting before requests failed; success rate stayed above threshold. Flagger did NOT auto-rollback.
|
|
311
|
+
8. **Action**: restore the known-good `v3.0.9` image through the GitOps/Helm controller that owns the Flagger target, using the approved controller-specific recovery procedure. `kubectl argo rollouts undo` operates on Argo Rollout resources and does not roll back a Flagger-managed Deployment. Verify Flagger status, actual pod image versions, and OOM/restart metrics after reconciliation. Hotfix: add LRU eviction to the template cache with a justified size limit, then add memory saturation as a custom Flagger analysis gate.
|
|
312
|
+
|
|
313
|
+
Reference: `boundaries/release.md` for Flagger/Argo canary analysis configuration; `signals/profiles.md` for Pyroscope heap diff workflow; `layers/L7-application/crash-analytics.md` for mobile/native crash-specific forensics.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## 6. Integration Points
|
|
318
|
+
|
|
319
|
+
This file does not operate in isolation. The following skill files provide the detailed implementation guidance for each step of the narrowing flow.
|
|
320
|
+
|
|
321
|
+
| Step / Concern | Cross-reference |
|
|
322
|
+
|---|---|
|
|
323
|
+
| Per-tenant pivot (Scenario B, `tenant.id` baggage) | `boundaries/multi-tenant.md`; 4-tier isolation and per-tenant collector routing |
|
|
324
|
+
| Mesh trace continuity (mesh span injection, zero-code) | `layers/mesh.md`; Envoy span propagation, baggage scrubbing at ingress |
|
|
325
|
+
| Flamegraph acquisition (Scenario B profiles, Scenario C heap diff) | `signals/profiles.md`; Parca/Pyroscope per-tenant labeling, Pyroscope diff view |
|
|
326
|
+
| Canary/rollback gates (Scenario C Flagger analysis) | `boundaries/release.md`; Flagger + Argo Rollouts custom metric gates, GitOps |
|
|
327
|
+
| Mobile/native crash OOM forensics | `layers/L7-application/crash-analytics.md`; CFR, symbolication, crash-linked release tracking |
|
|
328
|
+
| Release marker injection | `boundaries/release.md`; deployment SHA → `service.version` + marker event via `oma-scm` |
|
|
329
|
+
| Semconv stability for MRA attributes | `resources/standards.md §3`; stability tier table |
|
|
330
|
+
| Full signal-layer-boundary coverage | `resources/matrix.md`; 112-cell coverage map |
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 7. Anti-patterns
|
|
335
|
+
|
|
336
|
+
Violating these patterns makes the narrowing flow impossible or misleading. Full list lives in `resources/anti-patterns.md`.
|
|
337
|
+
|
|
338
|
+
| Anti-pattern | Consequence | Dimension blocked |
|
|
339
|
+
|---|---|---|
|
|
340
|
+
| Missing `trace_id` in structured logs | Log-trace join impossible; Step 4 cross-signal validation fails | All |
|
|
341
|
+
| `request_id` not injected at API gateway | User-support correlation impossible; Step 1 has no starting point | All |
|
|
342
|
+
| No release markers in log/metric stream | Step 5 release correlation is blind; rollback decision is guesswork | Service / release |
|
|
343
|
+
| NTP drift unmonitored on nodes | Waterfall chart timestamps are wrong; parent-before-child ordering unreliable; Step 3 pivots mislead | Layer / Code |
|
|
344
|
+
| PII in W3C Baggage across trust boundaries | `tenant.id` is acceptable; user email or session token in baggage is a GDPR/PIPA violation that becomes evidence in incident investigation records | All (compliance risk) |
|
|
345
|
+
| `user.id` or `user.email` as a metric label | High-cardinality metric explosion + PII in metric storage; cardinality guardrails in `resources/meta-observability.md` | Service |
|
|
346
|
+
| Canary Flagger analysis missing memory saturation gate | OOMKilled pods do not fail the success rate threshold; auto-rollback never triggers (Scenario C) | Service / infra |
|
|
347
|
+
|
|
348
|
+
Normative anti-patterns reference: `resources/anti-patterns.md §Section Z` (items 17, 18 directly referenced above).
|