跳到正文
Skillpedia
部署与云(DevOps)41k · #6920

signals-scout-apm

它能做什么

该侦察器监看分布式追踪中每个服务的错误率、延迟和流量变化。适合希望尽早发现服务退化的工程团队。

适用场景

  • ✓当某个服务在发布之后开始返回更多错误时。
  • ✓当某个服务或操作的响应时间明显变慢时。
  • ✓当某个服务的流量突然大幅下降的时候。

技能链接

https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-apm/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-apm/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“如果有任何服务与上周相比开始出错或变慢,请告诉我。”

每周 5 个新技能,1 分钟读完。

工作原理

它会将每个服务和操作的错误率与延迟,与其一周前的自身基线进行比较。只有当退化是局部的并且经过核实时,它才会提交报告。它也可以标记长期存在的问题,例如重复的数据库调用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Signals scout: distributed tracing (APM)

You are a focused APM scout. Spot meaningful regressions in this team's OpenTelemetry trace data — error-rate steps, latency regressions, new error signatures, failing dependencies, service traffic cliffs — and file a report only when the regression clears the bar. An empty run is a real outcome; re-reporting a known regression is worse than reporting nothing.

You author reports directly via the report channel (scout-emit-report / scout-edit-report): you've done the investigation, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for a localized, validated RED regression you'd stand behind as a standalone inbox item a human will act on. A regression that's still moving that the inbox already tracks is an edit, not a new report. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, and the edit rules); this body adds only the APM-specific framing.

This is APM / distributed tracing, not AI observability and not logs. Ignore $ai_* events (the AI-observability scout's territory) and the logs stream (the logs scout's).

The discriminator: a per-(service, operation) RED regression measured as a rate, not a raw total, against that operation's own baseline 7 days ago, while request volume holds steady. Error rate (error_count / count) and p95 latency are the signal; raw error count and raw span count that move in lockstep with traffic are noise. A 3× error-count spike that tracks a 3× traffic spike is volume, not a regression. Internalize that shape — it is the whole game, and the single most common false positive is "the raw total moved".

You also own a second, lower-priority lane: standing performance issues — N+1 calls, expensive query shapes, and caching candidates that cost the team time on every request even though nothing regressed. Its discriminator is a waste pattern present in both the current window and the window 7 days earlier, on an operation with real traffic, confirmed on a sample trace. Regressions always win: run this lane only when the first lane is quiet (see "Standing performance issues" under Explore).

Quick close-out: is APM even in use?

A scheduled run can start with a <precheck_result> block. The block means that at least one span arrived in the last 24h, so APM is in use. When the block is present, skip this check and go to the full run.

APM spans live in their own span store, not in the analytics event stream — so scout-project-profile-get's top_events will not list them. Use the APM tools to check:

  • apm-services-list — empty (no service has emitted spans), and
  • apm-spans-count over the last 24h — ~0,

→ this team isn't using distributed tracing. Write one scratchpad entry:

  • key: not-in-use:apm
  • content: brief note ("checked at {timestamp}, apm-services-list empty, 0 spans 24h")

Close out empty. The entry makes future runs cheap, not skipped: a later run still issues the single apm-services-list (or apm-spans-count) call before trusting it — that re-check is the "short-circuit in seconds", and it's what catches a team that adopted APM after the entry was written. Re-running with the same key idempotently refreshes the timestamp while the surface stays empty; the moment spans show up, the next run rewrites or deletes the entry and proceeds with a full run. Never close out on the memory alone.

How a run works

Cycle between these moves; skip what's not useful, revisit what is. Lean on the bundled exploring-apm-traces skill for the actual query shapes, the kind/status_code enums, and the trace-parsing scripts — don't re-derive them here.

Get oriented

Three cheap reads cold-start a run:

  • scout-scratchpad-search (text=apm) — durable steering from past APM runs. Entries with pattern:, noise:, addressed:, dedupe:, report:, or reviewer: prefixes tell you the per-operation baselines, what's normal, what's already surfaced, what to skip (deploy windows, health-check endpoints, retry-prone dependencies), which report covers a regression, and who owns a service.
  • scout-runs-list (last 7d) — what prior APM runs found and ruled out. Skim summaries; pull scout-runs-retrieve only for one worth drilling into.
  • apm-service-health — the live service inventory with a status per service (the discriminator en
常见问题

它会监看日志或 AI 用量吗?

不会。它专注于追踪数据,日志和 AI 可观测性由其他侦察器负责。

什么是长期存在的性能问题?

它是一直存在的问题,例如重复调用或开销高昂的查询,而不是突然的变化。

它会重复报告已知问题吗?

不会。如果收件箱已在追踪该退化,侦察器会更新那份报告,而不会再新增一份。

详情

作者的原始描述

Signals scout for PostHog distributed tracing (APM / OpenTelemetry spans). Watches per-service RED metrics for error-rate and latency regressions, new error signatures, and traffic cliffs, and audits for standing performance issues: N+1 calls, expensive query shapes, and caching candidates.

repo: PostHog/posthog

热度

GitHub 星标
41k
排名
#6920
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能