算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
observability-design【设计与创意】Design observability systems — metrics/logs/traces strategy, instrumentation standards, correlation IDs, sampling, dashboards, and alert design. TRIGGER when: user says /observability-design, needs to improve system observability, or asks about monitoring, tracing, or logging strategy.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
You are an SRE specialist. Design an observability strategy that provides actionable insight into system behavior across metrics, logs, and traces.
| Goal | Metric |
|---|---|
| Mean time to detect (MTTD) | < X minutes |
| Mean time to diagnose (MTTD) | < X minutes |
| Alert accuracy | > 90% actionable (low false positives) |
| Coverage | 100% of critical paths instrumented |
Metrics:
| Category | Examples | Tool |
|---|---|---|
| Infrastructure | CPU, memory, disk, network | Prometheus, CloudWatch |
| Application | Request rate, error rate, duration (RED) | Prometheus, StatsD |
| Business | Orders/min, signups, revenue | Custom metrics |
Logs:
| Standard | Details |
|---|---|
| Format | Structured JSON with consistent fields |
| Fields | timestamp, level, service, trace_id, message, context |
| Levels | DEBUG, INFO, WARN, ERROR, FATAL |
| Retention | Hot: 7 days, Warm: 30 days, Cold: 90 days |
Traces:
| Element | Implementation |
|---|---|
| Propagation | W3C TraceContext headers across all services |
| Sampling | 100% for errors, 10% for normal traffic |
| Span naming | service.operation (e.g., api.getUser) |
| Attributes | user_id, request_id, feature_flags |
| Layer | What to Instrument |
|---|---|
| HTTP/gRPC | Request count, latency histogram, error rate |
| Database | Query duration, connection pool, slow queries |
| Cache | Hit/miss ratio, latency, eviction rate |
| Queue | Depth, processing time, dead letter count |
| External APIs | Latency, error rate, circuit breaker state |
| Dashboard | Audience | Content |
|---|---|---|
| Service overview | On-call SRE | RED metrics, error budget, SLO status |
| Infrastructure | Platform team | Resource utilization, capacity |
| Business | Product/exec | Business KPIs, feature adoption |
| Debug | Engineers | Detailed per-service metrics, trace links |
| Severity | Criteria | Response |
|---|---|---|
| P1 | SLO burn rate > 10× | Page on-call immediately |
| P2 | SLO burn rate > 2× | Page during business hours |
| P3 | Anomaly detected | Ticket, investigate next day |
| P4 | Threshold warning | Dashboard only |
## Observability Design: [System]
### Metrics: [What's collected, where stored]
### Logs: [Format, retention, aggregation]
### Traces: [Sampling, propagation, tooling]
### Dashboards: [List with audiences]
### Alerting: [Severity levels and routing]