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,278 @@
|
|
|
1
|
+
---
|
|
2
|
+
otel_spec: "1.x (stable API/SDK)"
|
|
3
|
+
otel_semconv: "1.43.0 (2026-07)"
|
|
4
|
+
notes:
|
|
5
|
+
- "OTel mobile semconv still experimental; vendor-native SDKs dominate in 2026"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mobile RUM: L7 Application Layer
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Scope
|
|
13
|
+
|
|
14
|
+
**In scope:** Native mobile app Real User Monitoring for iOS (Swift/Obj-C), Android (Kotlin/Java), React Native, and Flutter. Covers performance, errors, app lifecycle events, network egress observability, offline telemetry queuing, and battery impact.
|
|
15
|
+
|
|
16
|
+
**Out of scope (see sibling files):**
|
|
17
|
+
- Mobile crash analytics specifics (symbolication pipeline, Crash-Free Rate computation, dSYM/ProGuard upload) → `crash-analytics.md`. This file references symbolication patterns but does not own the full pipeline.
|
|
18
|
+
- Mobile web RUM running inside an in-app WebView → `web-rum.md`. WebView telemetry is browser-runtime based and follows Web RUM patterns, not native SDK patterns.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. OTel Mobile SDK Status (as of 2026-Q2)
|
|
23
|
+
|
|
24
|
+
OpenTelemetry mobile SDKs are less mature than backend or web SDKs. Both are experimental status:
|
|
25
|
+
|
|
26
|
+
| Platform | OTel SDK | Status |
|
|
27
|
+
|----------|----------|--------|
|
|
28
|
+
| Android | `opentelemetry-android` + `opentelemetry-java-instrumentation` | Experimental |
|
|
29
|
+
| iOS | `opentelemetry-swift` | Experimental |
|
|
30
|
+
| React Native | No official OTel SDK | Vendor SDK only |
|
|
31
|
+
| Flutter | No official OTel SDK | Vendor SDK only |
|
|
32
|
+
|
|
33
|
+
In practice, mobile teams use **vendor-native SDKs** and map signals to OTel concepts where possible. This file uses vendor SDKs as the primary path and notes where OTel semconv applies.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 3. Offline-First Telemetry Queuing
|
|
39
|
+
|
|
40
|
+
Offline queuing is the defining mobile-specific concern. Mobile networks are intermittent, metered, roaming-constrained, and subject to airplane mode. A telemetry SDK that drops events on network failure is unsuitable for mobile.
|
|
41
|
+
|
|
42
|
+
### Queue design requirements
|
|
43
|
+
|
|
44
|
+
| Constraint | Recommended value | Rationale |
|
|
45
|
+
|------------|------------------|-----------|
|
|
46
|
+
| Disk storage cap | 1–5 MB | Balance completeness vs. user storage impact |
|
|
47
|
+
| Event TTL | 24–72 hours | Drop stale events before they mislead dashboards |
|
|
48
|
+
| Duplicate suppression | Idempotency key per event | Retry on reconnect must not produce duplicates |
|
|
49
|
+
| Backoff strategy | Exponential + jitter | Avoid thundering herd on reconnect |
|
|
50
|
+
| Send trigger | Network reachability change + foreground transition | Align with OS connectivity APIs |
|
|
51
|
+
|
|
52
|
+
### Quality considerations
|
|
53
|
+
|
|
54
|
+
- **Event ordering:** Queue flush order may differ from emit order. Attach a local device timestamp (`observed_time_unix_nano`) to every event. Server must tolerate out-of-order arrivals and sort by device timestamp for waterfall reconstruction.
|
|
55
|
+
- **Clock skew:** Device clocks may drift relative to server. Cross-reference `../../meta-observability.md §Clock skew` for handling. Do not rely on server receipt time as the canonical event timestamp.
|
|
56
|
+
- **Server tolerance:** OTLP backends (and vendor equivalents) are designed for out-of-order ingestion. Verify TTL settings on the collector pipeline so stale events are dropped before indexing.
|
|
57
|
+
|
|
58
|
+
### Privacy: queued data on disk
|
|
59
|
+
|
|
60
|
+
Events queued to disk are **PII at rest on user devices**. Requirements:
|
|
61
|
+
- Encrypt the queue using platform-native key storage: iOS Keychain, Android Keystore.
|
|
62
|
+
- Apply the same field-level redaction to queued events as to events sent immediately (mask email, card number, password fields before write, not before send).
|
|
63
|
+
- Anti-pattern: unencrypted telemetry queue on device; see Section 12.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 4. App Lifecycle Events
|
|
68
|
+
|
|
69
|
+
App lifecycle events anchor session boundaries and correlate performance observations to foreground/background transitions. Each platform exposes different lifecycle hooks; standardize on a common semconv attribute set.
|
|
70
|
+
|
|
71
|
+
### Lifecycle hook mapping
|
|
72
|
+
|
|
73
|
+
| Event | iOS | Android | React Native | Flutter |
|
|
74
|
+
|-------|-----|---------|--------------|---------|
|
|
75
|
+
| App becomes active / foreground | `applicationDidBecomeActive` | `Activity.onResume` / `ProcessLifecycleOwner.ON_START` | `AppState → 'active'` | `AppLifecycleState.resumed` |
|
|
76
|
+
| App enters background | `applicationDidEnterBackground` | `Activity.onPause` / `ProcessLifecycleOwner.ON_STOP` | `AppState → 'background'` | `AppLifecycleState.paused` |
|
|
77
|
+
| App will terminate | `applicationWillTerminate` | `Activity.onDestroy` | (no guaranteed callback) | `AppLifecycleState.detached` |
|
|
78
|
+
| Memory pressure | `didReceiveMemoryWarning` | `onTrimMemory(level)` | N/A (JS heap managed) | N/A |
|
|
79
|
+
|
|
80
|
+
### Semconv (experimental)
|
|
81
|
+
|
|
82
|
+
OTel mobile semconv is in progress as of 2026-Q2. Use custom attributes pending stabilization:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
app.lifecycle.event = "foreground" | "background" | "terminate" | "memory_warning"
|
|
86
|
+
app.session.id = <UUID generated at foreground entry, reset on cold start>
|
|
87
|
+
device.model.name = <product model string>
|
|
88
|
+
os.name = "ios" | "android"
|
|
89
|
+
os.version = <platform version string>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Swift one-liner (OTel span on foreground):
|
|
93
|
+
```swift
|
|
94
|
+
tracer.spanBuilder(spanName: "app.lifecycle").setSpanKind(.internal)
|
|
95
|
+
.setAttribute("app.lifecycle.event", "foreground").startSpan().end()
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Kotlin one-liner (OTel span on resume):
|
|
99
|
+
```kotlin
|
|
100
|
+
tracer.spanBuilder("app.lifecycle").setSpanKind(SpanKind.INTERNAL)
|
|
101
|
+
.setAttribute("app.lifecycle.event", "foreground").startSpan().end()
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 5. Battery Impact of RUM SDK
|
|
107
|
+
|
|
108
|
+
RUM SDKs are frequently among the largest third-party battery consumers on a mobile device, due to background network pings, location access, and sensor polling.
|
|
109
|
+
|
|
110
|
+
### Mitigation strategies
|
|
111
|
+
|
|
112
|
+
| Technique | iOS mechanism | Android mechanism |
|
|
113
|
+
|-----------|--------------|-------------------|
|
|
114
|
+
| Batch sends | `BGAppRefreshTask` (15-min minimum OS interval) | `WorkManager` with network constraint |
|
|
115
|
+
| Defer on low battery | `ProcessInfo.isLowPowerModeEnabled` | `BatteryManager.BATTERY_STATUS_DISCHARGING` + `PowerManager.isPowerSaveMode` |
|
|
116
|
+
| Skip cellular sends (optional) | `NWPathMonitor` check for `.cellular` interface | `ConnectivityManager.getNetworkCapabilities` → `NET_CAPABILITY_NOT_METERED` |
|
|
117
|
+
| Respect background execution limits | `BGAppRefreshTask` registration | Doze mode + App Standby bucket awareness |
|
|
118
|
+
| Sampling reduction on low signal | Custom rule in SDK config | Custom rule in SDK config |
|
|
119
|
+
|
|
120
|
+
### Measurement tools
|
|
121
|
+
|
|
122
|
+
- iOS: Xcode Energy Organizer + Instruments Energy Log
|
|
123
|
+
- Android: Battery Historian (<https://developer.android.com/topic/performance/power/battery-historian>)
|
|
124
|
+
|
|
125
|
+
### Carbon operations consideration
|
|
126
|
+
|
|
127
|
+
Mobile device CPU and network activity contribute to device-level energy consumption. For green observability practices, minimize telemetry flush frequency and batch size. Server-side carbon impact is tracked via Kepler (CNCF Sandbox) using CPU and network metrics on the collector nodes; mobile-side impact is the device CPU time and radio-on duration during flush.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 6. Network Egress Observability
|
|
132
|
+
|
|
133
|
+
| Concern | Guidance |
|
|
134
|
+
|---------|---------|
|
|
135
|
+
| Metered data awareness | Detect cellular vs. Wi-Fi; warn or throttle SDK sends on cellular by default (opt-in to always-on) |
|
|
136
|
+
| Request coalescing | Combine multiple queued spans into a single OTLP export request per flush cycle |
|
|
137
|
+
| Certificate pinning | Implement mTLS or certificate pinning for telemetry endpoints beyond mesh-level TLS; use platform SecTrustEvaluate / TrustManager accordingly |
|
|
138
|
+
| PII leakage via URL | Strip query parameters containing tokens, emails, or IDs before recording `url.full` in spans |
|
|
139
|
+
|
|
140
|
+
Network request spans follow OTel HTTP client semconv (`http.request.method`, `server.address`, `http.response.status_code`, `network.protocol.name`). These are Stable semconv as of 1.43.0.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 7. iOS vs Android SDK Comparison (as of 2026-Q2)
|
|
145
|
+
|
|
146
|
+
### iOS SDKs
|
|
147
|
+
|
|
148
|
+
| SDK | Coverage | Platforms | Notes |
|
|
149
|
+
|-----|----------|-----------|-------|
|
|
150
|
+
| Sentry Cocoa | Errors, performance, session replay, profiling | iOS, macOS, tvOS, watchOS, visionOS | Largest platform breadth; auto-instrumentation for URLSession |
|
|
151
|
+
| Datadog iOS RUM | RUM, traces, logs, error tracking | iOS, tvOS | Strong OTel bridge; custom view timing |
|
|
152
|
+
| Firebase Crashlytics | Crashes, breadcrumbs | iOS, macOS | Free; Google ecosystem; no RUM performance. ANR is Android-only; iOS Hang metric is a separate concept handled by MetricKit / Embrace |
|
|
153
|
+
| Embrace | Startup, Hang (iOS) / ANR (Android), network spans, session replay | iOS | Startup-time focus; per-session timeline view |
|
|
154
|
+
| `opentelemetry-swift` | Traces, metrics (experimental) | iOS, macOS | OTel-native; no auto-instrumentation yet |
|
|
155
|
+
|
|
156
|
+
### Android SDKs
|
|
157
|
+
|
|
158
|
+
| SDK | Coverage | Notes |
|
|
159
|
+
|-----|----------|-------|
|
|
160
|
+
| Sentry Android | Errors, performance, ANR, profiling, session replay | Auto-instrumentation via Gradle plugin; OkHttp + Retrofit |
|
|
161
|
+
| Datadog Android RUM | RUM, traces, logs, error tracking | Kotlin-first; OTel exporter available |
|
|
162
|
+
| Firebase Crashlytics | Crashes, ANR, breadcrumbs | Free; no RUM performance |
|
|
163
|
+
| Embrace | Startup, ANR, network, session replay | App Standby bucket reporting |
|
|
164
|
+
| `opentelemetry-android` | Traces, metrics (experimental) | OTel-native; auto-instrumentation via Bytecode plugin (experimental) |
|
|
165
|
+
|
|
166
|
+
Vendor category cross-reference: `../../vendor-categories.md §Crash Analytics` for full category taxonomy and how-to-choose criteria.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 8. React Native and Flutter
|
|
171
|
+
|
|
172
|
+
### React Native
|
|
173
|
+
|
|
174
|
+
React Native spans both the JS bridge and native layers. A single SDK must handle JS errors, native crashes, and the bridge overhead.
|
|
175
|
+
|
|
176
|
+
| SDK | Coverage |
|
|
177
|
+
|-----|----------|
|
|
178
|
+
| Sentry React Native | JS errors, native crashes, performance, session replay. Source map upload + native dSYM (iOS) / ProGuard (Android) combined via `sentry-cli`. |
|
|
179
|
+
| Datadog RN SDK | RUM, traces, logs. OTel bridge for trace propagation. |
|
|
180
|
+
|
|
181
|
+
Symbolication: JS source maps + native symbols must both be uploaded per release build. See `crash-analytics.md` for the full symbolication pipeline.
|
|
182
|
+
|
|
183
|
+
### Flutter
|
|
184
|
+
|
|
185
|
+
Flutter compiles to native ARM; the Dart VM's `--split-debug-info` flag separates debug symbols for upload.
|
|
186
|
+
|
|
187
|
+
| SDK | Coverage |
|
|
188
|
+
|-----|----------|
|
|
189
|
+
| Sentry Flutter | Dart errors, native crashes, performance. `--split-debug-info` + source map + native symbol upload via `sentry-dart-plugin`. |
|
|
190
|
+
| Firebase Crashlytics Flutter plugin | Dart and native crashes. Free; no RUM performance metrics. |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 9. W3C Trace Context Propagation: Mobile to Backend
|
|
195
|
+
|
|
196
|
+
Mobile apps are the root of distributed traces that span multiple backend services. Injecting `traceparent` on outbound requests enables end-to-end correlation.
|
|
197
|
+
|
|
198
|
+
**Propagation flow:**
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Mobile App (root span, SpanKind.CLIENT)
|
|
202
|
+
|-- traceparent header injected on HTTP/gRPC call
|
|
203
|
+
v
|
|
204
|
+
Backend API Gateway (continues trace, creates child spans)
|
|
205
|
+
|-- downstream services inherit trace context
|
|
206
|
+
v
|
|
207
|
+
Database / Queue / External API
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Implementation rules:**
|
|
211
|
+
|
|
212
|
+
1. The mobile SDK intercepts outbound HTTP requests and injects `traceparent` (and optionally `tracestate`) automatically. Configure the propagator in SDK init, not at call sites.
|
|
213
|
+
2. `tracestate` carries the mobile sampling decision. Backend tail samplers MUST respect the `sampled` flag to avoid dropping traces that the mobile side intends to keep.
|
|
214
|
+
3. The mobile span is `SpanKind.CLIENT`. The backend root span receiving the call is `SpanKind.SERVER`. This pairing is required by OTel span kind semantics.
|
|
215
|
+
4. **Session span challenge:** A mobile user session may span minutes or hours with many backend requests. Each HTTP call starts a new child span under the session root span. Store the session root span context in memory (not disk) to avoid stale context on OS-kill and restart.
|
|
216
|
+
5. Cross-reference: `../../boundaries/cross-application.md` for the full propagator matrix across service, domain, and vendor boundaries.
|
|
217
|
+
|
|
218
|
+
W3C Trace Context reference: `../../standards.md §W3C Trace Context`.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## 10. Performance Metrics (Mobile-Native)
|
|
223
|
+
|
|
224
|
+
| Metric | Definition | Target |
|
|
225
|
+
|--------|-----------|--------|
|
|
226
|
+
| Cold start time | Process launch to first interactive frame | < 2 s (iOS Instruments: `os_signpost`; Android: `reportFullyDrawn`) |
|
|
227
|
+
| Warm start time | App resumed from background to interactive | < 1 s |
|
|
228
|
+
| Hot start time | Activity recreated (Android) | < 500 ms |
|
|
229
|
+
| Frame rendering | Frame drop rate (jank) | iOS ≥ 60 fps (`CADisplayLink`); Android `FrameMetricsAggregator` Jank < 0.1% |
|
|
230
|
+
| User-perceived ANR rate | Daily active users with a user-perceived ANR / daily active users | Android Play overall threshold: 0.47%; custom session stall rates have a different denominator |
|
|
231
|
+
| iOS Hang rate | Non-responsive main thread > 250 ms | < 0.1% (MetricKit `MXHangDiagnostic`) |
|
|
232
|
+
| Network latency | Per-request round-trip time | Monitor p50/p95/p99 histograms; no universal target |
|
|
233
|
+
| Crash-Free Session Rate | Sessions without a crash / total sessions | Cross-reference `crash-analytics.md §CFR` |
|
|
234
|
+
|
|
235
|
+
Semconv for mobile startup spans: use `app.lifecycle.event = "cold_start"` with `app.startup.duration_ms` as a custom span attribute until OTel mobile semconv stabilizes.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 11. Matrix Cells (L7 Row, Mobile Slice)
|
|
240
|
+
|
|
241
|
+
These cells supplement the L7 rows in `../../matrix.md` with mobile-specific caveats:
|
|
242
|
+
|
|
243
|
+
| Cell | Symbol | Detail |
|
|
244
|
+
|------|--------|--------|
|
|
245
|
+
| L7 × multi-tenant × metrics | PARTIAL | `tenant.id` on mobile is typically derived from the authenticated user ID, not a direct tenant header. Map `user.id → tenant.id` server-side in the pipeline; avoid attaching `tenant.id` as a metric label on-device (cardinality risk). |
|
|
246
|
+
| L7 × cross-application × traces | PASS | Mobile → backend `traceparent` propagation; mobile span is the root CLIENT span. See Section 9. |
|
|
247
|
+
| L7 × slo × metrics | PASS | Mobile-side SLIs: cold start time p95, ANR rate, Hang rate. Define SLO targets in OpenSLO YAML referencing mobile metrics ingested via OTLP. Cross-reference `../../boundaries/slo.md`. |
|
|
248
|
+
| L7 × privacy × logs | PASS | On-device queued events contain PII at rest. Encryption via Keychain/Keystore required. Field-level masking of card numbers, emails, and passwords before write. Cross-reference `../../signals/privacy.md`. |
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 12. Anti-Patterns (Candidates for `../../anti-patterns.md §Section G`)
|
|
253
|
+
|
|
254
|
+
| Anti-pattern | Risk | Fix |
|
|
255
|
+
|-------------|------|-----|
|
|
256
|
+
| Telemetry queue stored unencrypted on device | PII at rest exposed if device is lost or compromised | Encrypt queue using iOS Keychain / Android Keystore before writing |
|
|
257
|
+
| Heavy RUM SDK flush on every event without batching | Battery drain → user complaints → app uninstall | Batch flushes; align with `BGAppRefreshTask` / `WorkManager` cadence |
|
|
258
|
+
| No event TTL on queue | Stale events (hours or days old) arrive at backend; mislead dashboards | Set TTL (24–72 h); drop on exceed before send |
|
|
259
|
+
| Missing `traceparent` injection on outbound HTTP | Client-server correlation broken; mobile sessions invisible in backend traces | Configure SDK HTTP interceptor at init; verify with network proxy tool |
|
|
260
|
+
| Session replay without PII field masking | Card numbers, emails, passwords captured in replay | Enable SDK masking rules on input fields; test with automated replay review |
|
|
261
|
+
| Using server receipt time as event timestamp | Clock skew between device and server corrupts waterfall ordering | Store `observed_time_unix_nano` (device local time) on every event at emit time |
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## References
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
- OTel Swift SDK: <https://opentelemetry.io/docs/languages/swift/>
|
|
269
|
+
- OTel Android SDK: <https://github.com/open-telemetry/opentelemetry-android>
|
|
270
|
+
- Sentry Cocoa: <https://docs.sentry.io/platforms/apple/>
|
|
271
|
+
- Sentry Android: <https://docs.sentry.io/platforms/android/>
|
|
272
|
+
- Datadog iOS RUM: <https://docs.datadoghq.com/real_user_monitoring/ios/>
|
|
273
|
+
- Datadog Android RUM: <https://docs.datadoghq.com/real_user_monitoring/android/>
|
|
274
|
+
- Firebase Crashlytics: <https://firebase.google.com/docs/crashlytics>
|
|
275
|
+
- iOS Background Tasks: <https://developer.apple.com/documentation/backgroundtasks>
|
|
276
|
+
- Android App Standby / Doze: <https://developer.android.com/topic/performance/appstandby>
|
|
277
|
+
- W3C Trace Context L1: <https://www.w3.org/TR/trace-context/>
|
|
278
|
+
- Battery Historian: <https://developer.android.com/topic/performance/power/battery-historian>
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
otel_spec: "1.x (stable API/SDK)"
|
|
3
|
+
otel_semconv: "1.43.0 (2026-07); no stable WAF-specific semconv group; custom `waf.*` attributes used below"
|
|
4
|
+
tools:
|
|
5
|
+
- "ModSecurity v3 (libmodsecurity3): mature; OWASP CRS 4.x"
|
|
6
|
+
- "Coraza v3.x: OWASP-led, Go-native; Envoy/Caddy/HAProxy integrations"
|
|
7
|
+
- "AWS WAF v2; Cloudflare WAF; Akamai App & API Protector; Imperva; F5 NGINX App Protect"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# WAF Rule Observability
|
|
11
|
+
|
|
12
|
+
## 1. Scope
|
|
13
|
+
|
|
14
|
+
This file covers Web Application Firewall (WAF) rule observability: rule hit rate, block/false-positive trends, edge latency overhead, rule-change correlation, and how WAF actions propagate into downstream service health.
|
|
15
|
+
|
|
16
|
+
**In scope:** rule hit and block telemetry, OWASP CRS paranoia level effects, edge-tier latency attribution, false-positive (FP) and false-negative (FN) tracking, WAF rule release markers, cascading 4xx storms caused by FP surges, WAF-to-application trace correlation, bypass-attempt audit, multi-tenant rule attribution.
|
|
17
|
+
|
|
18
|
+
**Out of scope:** WAF rule authoring strategy (use OWASP CRS docs and vendor playbooks); DDoS mitigation orchestration (use vendor anti-DDoS such as Cloudflare Magic Transit, AWS Shield Advanced); TLS-inspection content analysis (see SKILL.md OOS table for Wireshark / Cloudflare Radar); bot management product evaluation (vendor-specific).
|
|
19
|
+
|
|
20
|
+
Cross-references:
|
|
21
|
+
- L3 firewall and security-group rule visibility: `../L3-network.md §3 VPC flow logs §6.4 Security Observability`
|
|
22
|
+
- L4 UDP/QUIC firewall fallback: `../L4-transport.md §7.4 Firewall and Enterprise Deployment`
|
|
23
|
+
- Mesh ingress + Envoy + Coraza WAF integration: `../mesh.md`
|
|
24
|
+
- SIEM/enterprise log routing of WAF events: `../../vendor-categories.md §(e) SIEM / Enterprise Logs`
|
|
25
|
+
- WAF block as audit signal: `../../signals/audit.md`
|
|
26
|
+
- IP in WAF logs as PII: `../../signals/privacy.md §IP addresses`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. WAF Action Model
|
|
31
|
+
|
|
32
|
+
A WAF rule evaluation produces one of these actions on every request:
|
|
33
|
+
|
|
34
|
+
| Action | Meaning | Downstream effect | OTel attribute |
|
|
35
|
+
|--------|---------|------------------|----------------|
|
|
36
|
+
| `allow` | Rule did not match; request forwarded | Normal | `waf.action = "allow"` |
|
|
37
|
+
| `block` | Rule matched and blocked | 403 to client; no backend call | `waf.action = "block"` |
|
|
38
|
+
| `challenge` | Rule matched; CAPTCHA/JS challenge issued | Backend call deferred until pass | `waf.action = "challenge"` |
|
|
39
|
+
| `log` (detect-only) | Rule matched; request still forwarded | Backend serves normally; signal only | `waf.action = "log"` |
|
|
40
|
+
| `count` (vendor) | Rule matched; counter incremented; pass-through | Backend serves normally | `waf.action = "count"` |
|
|
41
|
+
|
|
42
|
+
`log` / `count` modes are the safe deploy path for new rules; never promote a rule to `block` until its FP rate is verified at a target ratio (commonly < 0.1% of traffic) over a representative window.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 3. Required Attributes per WAF Event
|
|
47
|
+
|
|
48
|
+
Every WAF rule evaluation emitted as a span event or structured log record MUST carry these attributes. They make rule effectiveness, FP investigation, and cascading failure attribution tractable.
|
|
49
|
+
|
|
50
|
+
| Attribute | Format | Purpose |
|
|
51
|
+
|-----------|--------|---------|
|
|
52
|
+
| `waf.vendor` | string (`modsecurity`, `coraza`, `aws-waf`, `cloudflare`, `akamai`, `imperva`, `nginx-app-protect`) | Vendor pivot in unified dashboards |
|
|
53
|
+
| `waf.rule.id` | string (e.g., `942100`, `crs-942100-sqli`, `AWSManagedRulesCommonRuleSet`) | Per-rule effectiveness analysis |
|
|
54
|
+
| `waf.rule.set.version` | string (CRS version, AWS managed-rules version, Cloudflare ruleset SHA) | **Release correlation; FP surges align with this bump** |
|
|
55
|
+
| `waf.action` | enum from Section 2 | Action distribution |
|
|
56
|
+
| `waf.match.category` | string (`sqli`, `xss`, `lfi`, `rfi`, `rce`, `protocol`, `scanner`, `bot`, `dos`, `geo`) | Trend analysis by attack class |
|
|
57
|
+
| `waf.score` | int (OWASP CRS anomaly score) | Threshold investigation |
|
|
58
|
+
| `waf.paranoia.level` | int (1–4 for CRS) | FP rate scales with PL; track per release |
|
|
59
|
+
| `http.request.method` | semconv (stable) | Baseline pivot |
|
|
60
|
+
| `http.route` | semconv (stable) | Per-route FP isolation |
|
|
61
|
+
| `http.response.status_code` | semconv (stable) | `403` from WAF distinguishable from app 403 by combining with `waf.action = "block"` |
|
|
62
|
+
| `client.address` | semconv (stable; IP); **PII** | Apply masking per `../../signals/privacy.md` |
|
|
63
|
+
| `trace_id`, `span_id` | OTel context | Join WAF event → application trace |
|
|
64
|
+
| `service.version` | semconv (stable) | Application-side release pivot |
|
|
65
|
+
| `tenant.id` | W3C Baggage | Per-tenant WAF rule scoping in multi-tenant SaaS |
|
|
66
|
+
|
|
67
|
+
Note on stability: there is no OTel `waf.*` semconv group as of 2026-Q2 (semconv 1.43.0). The attribute names above are this skill's convention; they share the dot-namespace style with stable groups. If `waf.*` is later standardized, treat the above as a migration source.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 4. Edge Latency Attribution
|
|
72
|
+
|
|
73
|
+
WAF runs at the edge or in-mesh and adds latency to every request. Without per-rule timing, a slow rule (regex backtracking, GeoIP lookup, IP reputation API) is invisible until it shows as a service-wide p99 spike.
|
|
74
|
+
|
|
75
|
+
| Metric | Type | Purpose |
|
|
76
|
+
|--------|------|---------|
|
|
77
|
+
| `waf_request_duration_seconds` | Histogram | Total WAF processing time per request (label by `waf.rule.set.version`) |
|
|
78
|
+
| `waf_rule_duration_seconds` | Histogram | Per-rule processing time (`waf.rule.id` label, capped to top-N rules) |
|
|
79
|
+
| `waf_regex_backtrack_total` | Counter | ReDoS-prone rules; alerts on positive trend |
|
|
80
|
+
| `waf_origin_call_total` | Counter | Reputation/threat-intel API calls; rate-limit-prone dependency |
|
|
81
|
+
| `waf_origin_call_failure_total` | Counter | When reputation API fails, fail-open vs fail-closed policy must be explicit |
|
|
82
|
+
|
|
83
|
+
**Anti-pattern:** treating WAF as a transparent zero-cost layer. ModSecurity with CRS paranoia level 4 routinely adds 5–15 ms p50; at the 99th percentile a single bad regex can add hundreds of ms. Always carry `waf.processing.duration_ms` as a span attribute on the ingress span.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 5. False-Positive Surge: Cascading 4xx Storm
|
|
88
|
+
|
|
89
|
+
When a WAF rule update over-blocks legitimate traffic, every affected request returns 403 from the edge. Downstream services see request volume drop (good), but customers see errors (bad). Without WAF-aware dashboards, on-call investigates "missing traffic" rather than "WAF blocking my users".
|
|
90
|
+
|
|
91
|
+
### Signature
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
1. waf_action_total{action="block"} step-changes upward at T0.
|
|
95
|
+
2. http_requests_total{status="403"} at edge spikes; service-level error rate does NOT spike.
|
|
96
|
+
3. service_requests_total at backend drops 5–30%.
|
|
97
|
+
4. waf.rule.set.version recorded a change at T0 (release marker).
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Required correlated artifacts
|
|
101
|
+
|
|
102
|
+
| Artifact | Source | Purpose |
|
|
103
|
+
|----------|--------|---------|
|
|
104
|
+
| Edge 403 rate by `waf.rule.id` | WAF telemetry | Identify the offending rule |
|
|
105
|
+
| Per-customer block rate by `tenant.id` | WAF telemetry with baggage | Is this single-customer or fleet-wide? |
|
|
106
|
+
| `waf.rule.set.version` release marker | `../../boundaries/release.md` | Time alignment with rollout |
|
|
107
|
+
| Application-side `http.server.request.duration` segmented by edge-vs-backend 403 | App OTel SDK | Confirm the 403 originated at WAF, not the app |
|
|
108
|
+
|
|
109
|
+
### Forensics path
|
|
110
|
+
|
|
111
|
+
This is a Step-5-first scenario (release correlation before service pivot). See `../../incident-forensics.md §3` for the standard 6-dimension flow; for WAF FP storms invert it:
|
|
112
|
+
|
|
113
|
+
1. Check `waf.rule.set.version` change in the incident window.
|
|
114
|
+
2. Group `waf_action_total{action="block"}` by `waf.rule.id`; identify the rule whose block count grew.
|
|
115
|
+
3. Sample a blocked `trace_id` (most WAFs inject `traceparent` or `X-Amzn-Trace-Id` even on blocks); pull the original request URL and headers from the WAF log (with PII masking applied).
|
|
116
|
+
4. Decide: rollback the ruleset version, or shift the rule to `log` mode while a tuning patch is prepared.
|
|
117
|
+
|
|
118
|
+
`log` mode rollback is preferred over full ruleset rollback when only one rule is the offender; it preserves protection from the other rules in the same release.
|
|
119
|
+
|
|
120
|
+
### Recovery time budget
|
|
121
|
+
|
|
122
|
+
Per the incident-forensics playbook's 15-minute SLA, WAF FP rollback should complete inside the same window. Maintain a pre-approved "rule-to-detect-mode" runbook so the on-call does not need a security review to flip a rule's action during an active incident.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 6. WAF as a Dependency: Fail-Open vs Fail-Closed
|
|
127
|
+
|
|
128
|
+
WAFs that consult external services (IP reputation, bot scoring, threat-intel API, GeoIP lookup) inherit those dependencies' failure modes. When the external service degrades, the WAF policy choice is consequential.
|
|
129
|
+
|
|
130
|
+
| Policy | Behavior on dependency timeout | Risk |
|
|
131
|
+
|--------|--------------------------------|------|
|
|
132
|
+
| **Fail-open** | Allow the request; emit `waf.action = "allow"` + `waf.dependency.failed = true` | Brief security gap; legitimate users unaffected |
|
|
133
|
+
| **Fail-closed** | Block the request; emit `waf.action = "block"` + `waf.dependency.failed = true` | Mass legitimate-user blocking when the dependency is down; full outage to your users |
|
|
134
|
+
|
|
135
|
+
Both policies are valid choices, but the choice must be observable. Required signal:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
waf_dependency_failure_total{dependency="ip-reputation-api", policy="fail-open"} = N
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Alert when this counter is non-zero for more than 60 s. The dependency outage may not affect users today, but it changes your security posture; on-call must know.
|
|
142
|
+
|
|
143
|
+
**Anti-pattern:** fail-closed without monitoring the dependency. A third-party reputation API can take down 100% of your traffic with no advance warning. Always emit `waf.dependency.failed` and treat its rate as an SLO input.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 7. Vendor Telemetry Surfaces
|
|
148
|
+
|
|
149
|
+
Routing index only. Vendor-specific configuration (YAML, plan tiers, query syntax, pricing) is owned by each vendor's authoritative docs; this table delegates to them via `../../vendor-categories.md §(e) SIEM / Enterprise Logs`.
|
|
150
|
+
|
|
151
|
+
| Vendor | Log surface | Trace header to map | Docs |
|
|
152
|
+
|--------|------------|---------------------|------|
|
|
153
|
+
| Coraza (Envoy WASM / Caddy / HAProxy SPOE) | Mesh ingress access logs | `traceparent` (native) | <https://www.coraza.io/> |
|
|
154
|
+
| ModSecurity v3 | NGINX / Apache logs | `traceparent` via NGINX OTel module | <https://github.com/owasp-modsecurity/ModSecurity> |
|
|
155
|
+
| AWS WAF | CloudWatch Logs / Kinesis Firehose | `X-Amzn-Trace-Id` | <https://docs.aws.amazon.com/waf/latest/developerguide/logging.html> |
|
|
156
|
+
| Cloudflare WAF | Logpush / Logpull | `cf-ray` → W3C baggage at edge | <https://developers.cloudflare.com/logs/logpush/> |
|
|
157
|
+
| Akamai App & API Protector | DataStream 2 | `X-Akamai-*` → origin OTel map | <https://techdocs.akamai.com/datastream2/docs> |
|
|
158
|
+
| Imperva (Incapsula) | SIEM connector; CEF / LEEF | Custom session ID → origin map | <https://docs.imperva.com/bundle/cloud-application-security/page/integrations-overview.htm> |
|
|
159
|
+
| F5 NGINX App Protect | Splunk / CEF / syslog | NGINX OTel module passthrough | <https://docs.nginx.com/nginx-app-protect-waf/> |
|
|
160
|
+
|
|
161
|
+
Normalize all surfaces into the common `waf.*` attribute set (§3) via the OTel Collector `transform` processor before reaching the backend. WAF events are simultaneously operational telemetry and audit records.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 8. Audit and Compliance
|
|
166
|
+
|
|
167
|
+
WAF events carry security significance and must be retained per the audit signal rules in `../../signals/audit.md`.
|
|
168
|
+
|
|
169
|
+
| Event class | Retention | Storage |
|
|
170
|
+
|-------------|-----------|---------|
|
|
171
|
+
| All `block` actions | 1 year | Hot or warm; queryable for FP investigation |
|
|
172
|
+
| All `log` (detect-only) actions | 90 days | Hot |
|
|
173
|
+
| `allow` actions | Sampled at 1% (tail-keep on flagged categories) | Hot |
|
|
174
|
+
| Authenticated bypass attempts (rule match + valid session) | Approved purpose/legal schedule | Access control and tamper protection; WORM if required |
|
|
175
|
+
| Rule-set version change events | Approved change-evidence schedule | Tamper protection; tied to release-marker stream |
|
|
176
|
+
|
|
177
|
+
Cross-ref `../../signals/audit.md §retention matrix` for the unified retention policy.
|
|
178
|
+
|
|
179
|
+
`client.address` (source IP) appears in every WAF record and is PII under GDPR Article 4(1) and PIPA. Apply pipeline-stage redaction per `../../signals/privacy.md §IP addresses` before the records reach long-term storage. Block records retain enough fidelity for forensics (e.g., `/24` prefix preserved, last octet hashed) without retaining identifiable IP after the operational window expires.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 9. Multi-Tenant WAF Rule Scoping
|
|
184
|
+
|
|
185
|
+
In multi-tenant SaaS, different tenants may have different threat profiles or contractual WAF policies. Per-tenant rule attribution requires:
|
|
186
|
+
|
|
187
|
+
1. `tenant.id` propagated to the edge via baggage (`../../boundaries/cross-application.md §Baggage at trust boundaries`).
|
|
188
|
+
2. WAF rules scoped by tenant (vendor support varies: Cloudflare Custom Rules + tenant header match; AWS WAF rule groups per CloudFront distribution per tenant; Coraza per-route rule lists).
|
|
189
|
+
3. Telemetry tagged with `tenant.id` so a tenant-specific FP surge does not contaminate the global rate.
|
|
190
|
+
|
|
191
|
+
Anti-pattern: a global rule set with no tenant scoping forces every customer onto the strictest profile, which inflates global FP rate and obscures tenant-specific tuning needs. See `../../boundaries/multi-tenant.md §isolation tiers`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 10. Matrix Coverage Contribution
|
|
196
|
+
|
|
197
|
+
This file contributes to existing L7-application matrix cells. It does not add new cells (the matrix taxonomy is fixed at 112 cells per `../../matrix.md §6`).
|
|
198
|
+
|
|
199
|
+
| Matrix cell | Contribution |
|
|
200
|
+
|-------------|--------------|
|
|
201
|
+
| L7 × cross-application × logs | WAF block log records carry `trace_id` for log-trace join into the application call chain |
|
|
202
|
+
| L7 × cross-application × audit | WAF block stream as compliance audit feed; cross-application security boundary |
|
|
203
|
+
| L7 × multi-tenant × audit | Per-tenant WAF rule effectiveness and bypass-attempt evidence |
|
|
204
|
+
| L7 × release × metrics | `waf.rule.set.version` as release marker; ruleset rollouts visible in pre/post comparison |
|
|
205
|
+
| L7 × release × logs | Ruleset version change events as structured deployment records |
|
|
206
|
+
| L7 × {all boundaries} × privacy | `client.address` masking and selective retention per audit class |
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 11. Anti-Patterns (Section F: Security & Compliance Candidates)
|
|
211
|
+
|
|
212
|
+
Candidates added to `../../anti-patterns.md §F`:
|
|
213
|
+
|
|
214
|
+
| ID | Anti-pattern | Impact | Remedy |
|
|
215
|
+
|----|--------------|--------|--------|
|
|
216
|
+
| F.6 | WAF rule hit/block rate unmonitored | Cascading 4xx storms from rule updates discovered by customer complaints, not by on-call | Emit `waf_action_total{action,rule_id,rule_set_version}`; alert on block rate step change > 3σ vs 24h baseline |
|
|
217
|
+
| F.7 | WAF rule-set deploy without release marker | Cannot align block-rate surge with rule update; rollback decision is guesswork | Emit a structured deployment event with `waf.rule.set.version` on every ruleset rollout; treat same as `service.version` |
|
|
218
|
+
| F.8 | WAF fail-closed without dependency-health signal | Third-party reputation API outage silently blocks all traffic; no on-call signal | Emit `waf_dependency_failure_total` per external dependency; alert when non-zero for > 60s; document fail-open/closed policy per rule |
|
|
219
|
+
| F.9 | WAF logs detached from application trace context | Block at edge invisible inside application trace; on-call cannot determine "did this user even reach us?" | Configure WAF to propagate `traceparent` even on blocks; map vendor headers (`cf-ray`, `X-Amzn-Trace-Id`) to baggage at the edge |
|
|
220
|
+
| F.10 | WAF rules in `block` mode without prior `log`-mode soak | New rule promoted to block on day 0; FP rate unknown; high risk of mass-block incident | Mandatory minimum 24h `log`-mode soak per new rule with FP rate verified < target ratio before promotion to `block` |
|
|
221
|
+
|
|
222
|
+
These follow the existing `### F.{n}` format in `../../anti-patterns.md`.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 12. References
|
|
227
|
+
|
|
228
|
+
Internal cross-references:
|
|
229
|
+
- `../../standards.md`: stable semconv tiers (`http.*`, `client.*`, `service.*`) used as anchors for the `waf.*` extension
|
|
230
|
+
- `../../matrix.md`: 112-cell coverage map; this file contributes to L7-application cells without adding new ones
|
|
231
|
+
- `../../incident-forensics.md`: 6-dim narrowing flow; WAF FP storms invert the order (release marker first)
|
|
232
|
+
- `../../anti-patterns.md`: Section F candidates F.6–F.10
|
|
233
|
+
- `../../vendor-categories.md §(e) SIEM / Enterprise Logs`: WAF event routing as audit records
|
|
234
|
+
- `../../signals/audit.md`: WAF block retention and WORM rules
|
|
235
|
+
- `../../signals/privacy.md`: IP-address masking pipeline for `client.address`
|
|
236
|
+
- `../../signals/logs.md`: structured logging contract; WAF records inherit it
|
|
237
|
+
- `../../boundaries/cross-application.md`: header mapping (`cf-ray`, `X-Amzn-Trace-Id`) to W3C baggage
|
|
238
|
+
- `../../boundaries/release.md`: WAF ruleset version as a release marker stream
|
|
239
|
+
- `../../boundaries/multi-tenant.md`: per-tenant rule scoping isolation tiers
|
|
240
|
+
- `../mesh.md`: mesh ingress integration point for in-mesh WAF
|
|
241
|
+
- `../L3-network.md`: firewall ACCEPT/REJECT visibility; complementary to WAF L7 visibility
|
|
242
|
+
- `../L4-transport.md`: UDP/QUIC firewall fallback behavior
|
|
243
|
+
|
|
244
|
+
External references (vendor URLs in §7 table are authoritative for their products):
|
|
245
|
+
- OWASP Core Rule Set (CRS) v4: <https://coreruleset.org/>
|
|
246
|
+
- W3C Trace Context: <https://www.w3.org/TR/trace-context/>
|