service-mesh-observability
它能做什么
这个技能可以帮你了解应用之间相互通信时内部发生了什么。它会收集请求耗时、错误数量以及服务之间的连接情况等信息。
适用场景
- ✓正在为服务网络搭建监控时。
- ✓想弄清楚为什么系统变慢或频繁出错时。
- ✓需要为服务之间的通信制定性能目标时。
技能链接
https://github.com/wshobson/agents/blob/main/plugins/cloud-infrastructure/skills/service-mesh-observability/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我怎样才能查看服务之间每次请求所花费的时间?”
每周 5 个新技能,1 分钟读完。
工作原理
它主要通过三种方式收集数据:指标(关于性能的数字)、追踪(一次请求所经过的路径)和日志(详细的消息记录)。这些数据会用于生成仪表盘,帮助定位问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Service Mesh Observability
Complete guide to observability patterns for Istio, Linkerd, and service mesh deployments.
When to Use This Skill
- Setting up distributed tracing across services
- Implementing service mesh metrics and dashboards
- Debugging latency and error issues
- Defining SLOs for service communication
- Visualizing service dependencies
- Troubleshooting mesh connectivity
Core Concepts
1. Three Pillars of Observability
┌─────────────────────────────────────────────────────┐
│ Observability │
├─────────────────┬─────────────────┬─────────────────┤
│ Metrics │ Traces │ Logs │
│ │ │ │
│ • Request rate │ • Span context │ • Access logs │
│ • Error rate │ • Latency │ • Error details │
│ • Latency P50 │ • Dependencies │ • Debug info │
│ • Saturation │ • Bottlenecks │ • Audit trail │
└─────────────────┴─────────────────┴─────────────────┘
2. Golden Signals for Mesh
| Signal | Description | Alert Threshold |
|---|---|---|
| Latency | Request duration P50, P99 | P99 > 500ms |
| Traffic | Requests per second | Anomaly detection |
| Errors | 5xx error rate | > 1% |
| Saturation | Resource utilization | > 80% |
Templates and detailed worked examples
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Best Practices
Do's
- Sample appropriately - 100% in dev, 1-10% in prod
- Use trace context - Propagate headers consistently
- Set up alerts - For golden signals
- Correlate metrics/traces - Use exemplars
- Retain strategically - Hot/cold storage tiers
Don'ts
- Don't over-sample - Storage costs add up
- Don't ignore cardinality - Limit label values
- Don't skip dashboards - Visualize dependencies
- Don't forget costs - Monitor observability costs
常见问题
“指标”“追踪”和“日志”分别是什么?
指标是关于性能的数字,比如每秒请求数。追踪展示一次请求在多个服务之间的流转过程。日志是服务写下的详细消息记录。
什么是“黄金信号”(Golden Signals)?
这是 4 个最重要的监控指标:延迟(响应时间)、流量(请求量)、错误(失败率)和饱和度(资源使用率)。
什么是“采样”?
采样是只收集一部分请求的数据,而不是全部,以节省存储空间和成本。在测试环境中可以收集全部数据,在生产环境中通常只收集很小的一部分。
详情
作者的原始描述
Implement comprehensive observability for service meshes including distributed tracing, metrics, and visualization. Use when setting up mesh monitoring, debugging latency issues, or implementing SLOs for service communication.
repo: wshobson/agents
热度
- GitHub 星标
- 41k
- 排名
- #6663
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …