observability-baseline
Sets logging, metrics and tracing conventions for the codebase. Use when setting up or auditing monitoring.
- License 许可
- MIT
- 所属仓库
- vibbs/company-os
- 最近更新
- 2026-10-21
- Stars
- ★ 6
- Forks
- 2
01 前言 Front Matter
- name
- observability-baseline
- description
- Sets logging, metrics and tracing conventions for the codebase. Use when setting up or auditing monitoring.
- user-invocable
- false
02 资源文件 2
- 脚本scripts/review_case.py20.1 KB
- 脚本tests/test_review_case.py6.8 KB
03 SKILL.md 正文
Observability Baseline
Reference
- ID: S-ENG-15
- Category: Engineering
- Inputs: service architecture, SLOs, existing logging/metrics setup
- Outputs: observability standards document → artifacts/engineering/
- Used by: Engineering Agent
- Tool scripts: ./tools/artifact/validate.sh
Purpose
Defines the baseline conventions for structured logging, application metrics, and distributed tracing so that every service produces consistent, queryable telemetry data from day one.
Procedure
Step 0: Tech Stack Detection
Read observability.* from company.config.yaml to determine logging, metrics, and tracing providers.
Provider-specific patterns:
| Provider | Logging | Metrics | Tracing |
|---|---|---|---|
| Datadog | Pino → dd-trace auto-inject |
StatsD via hot-shots |
dd-trace auto-instrumentation |
| Sentry | @sentry/node breadcrumbs |
Sentry performance metrics | Sentry transactions |
| OpenTelemetry | OTLP exporter | OTLP metrics | OTLP spans |
| CloudWatch | winston + CloudWatch transport |
CloudWatch embedded metrics | X-Ray SDK |
Structured log required fields:
{
"timestamp": "ISO-8601",
"level": "info|warn|error|debug",
"message": "Human-readable description",
"request_id": "uuid",
"user_id": "optional",
"tenant_id": "optional (if multi-tenant)",
"duration_ms": "optional (for timed operations)",
"error": { "code": "string", "stack": "string" }
}
Cross-references: See deployment-strategy for infrastructure setup, incident-response for alert routing.
- Audit the current observability setup: what logging, metrics, and tracing exist today.
- Define structured logging conventions: log levels, required fields (request_id, tenant_id, user_id), format (JSON).
- Define application metrics conventions: naming scheme, label cardinality limits, standard metrics (request duration, error rate, queue depth).
- Define distributed tracing conventions: span naming, context propagation, sampling strategy.
- Establish SLO-aligned alerting: map each SLO to a metric and define alert thresholds.
- Document correlation strategy: how to go from an alert to logs to traces.
- Define sensitive data handling in telemetry: what must never be logged (PII, secrets).
- Create example code snippets for each convention.
- Save the standards document to
artifacts/engineering/. - Validate the artifact using
./tools/artifact/validate.sh.
Quality Checklist
- [ ] Structured logging format is defined with required fields
- [ ] Metric naming conventions follow a consistent scheme
- [ ] Distributed tracing spans are named consistently
- [ ] SLO-to-alert mapping is documented
- [ ] Correlation path (alert → logs → traces) is clear
- [ ] PII/secret exclusion rules are specified
- [ ] Example code snippets are provided
- [ ] Artifact passes validation
04 同仓库更多 Skills
typo-field
Fixture skill with a misspelled top-level field.
spaced-comments
Fixture skill with comments and spaces after block keys.
crlf-comments
Fixture skill with Windows line endings.
claude-fields
Fixture skill using top-level fields Claude Code documents.
workflow-router
Maps an objective to the artifacts, stages and agents it needs. Use when deciding what happens next or which agents to involve.
weekly-review
Summarizes your week: what shipped, AI spend, support themes, security health and next priorities. Use at the end of each week.