signals-scout-apm

posthog/posthog

Скаут Signals для распределённого трейсинга PostHog: RED-метрики по сервисам и операциям.

Звёзды40 862
Авторposthog
Установок2

Установка

SKILL.md

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".

Quick close-out: is APM even in use?

APM spans live in their own span store, not in the analytics event stream — so 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-services-list — the live service inventory. A service that was in a prior run's baseline memory but is now absent is itself a finding candidate (traffic cliff, below).
  • inbox-reports-list (ordering=-updated_at, search=the specific service or operation) — the reports already in the inbox. Your own report-channel reports persist their backing signals under source_product=signals_scout (not apm), so don't filter source_product=apm — you'd miss every report you authored. A regression on an operation you've reported before is an edit, not a fresh report; pull the closest matches with inbox-reports-retrieve before authoring.

The discriminator engine

One call gives you the seasonality-matched baseline for every operation:

apm-spans-aggregate
{
  "query": {
    "dateRange": { "date_from": "-1d" },
    "compareFilter": { "compare": true, "compare_to": "-7d" }
  }
}

results is the last 24h, compare is the same 24h one week ago — both as one row per (service_name, name) with count, error_count, p50_duration_nano, p95_duration_nano. Join the two arrays on (service_name, name) and compute, per operation:

  • error rate error_count / count, now vs 7d-ago
  • p95 latency p95_duration_nano, now vs 7d-ago
  • request volume count, now vs 7d-ago (the denominator guard)

A busy service returns hundreds of operations (the payload runs to 100KB+ and the harness persists it to a file) — process it programmatically, don't eyeball it. Sort operations by delta and keep only those where the rate moved but count stayed within ~2× (the guard that separates a real regression from a volume swing); a low-count operation has too small a sample for a stable percentile (see disqualifiers). Scope to a few services per run rather than pulling the whole project at once.

Profile shape

PatternWhat it usually means
error_count up, count up proportionally (rate ~flat)traffic spike — not a regression, skip
error_count up, count ~flat (error rate steps up)real error regression — investigate first
p95 up materially, count ~flatlatency regression — investigate
p95 up and count up sharplysaturation under load — investigate, lower confidence
new (service, name) erroring, no 7d-ago rownew code path / recent deploy — investigate
service in baseline memory, now ~0 spanstraffic cliff (instrumentation break or outage) — investigate

Always score the latest complete bucket/window — a partial current hour always reads as a drop in volume and a dip in p95.

Explore

Patterns to watch — starting points, not a checklist.

Error-rate regression

From the discriminator engine, find operations where error rate stepped up materially while count held roughly steady. Confirm when it started: apm-spans-sparkline with your service/operation filters for total counts, then the same call with statusCodes: [2] for error counts — error rate per bucket = errors / total; the bucket where the ratio jumps is the onset. Pull a representative failing trace: query-apm-spans with a status_code = 2 filter and orderBy: "duration", grab a trace_id, then apm-trace-get and read exception.type / exception.message straight off the error span's attributes map. Walk parent_span_id up to see the request path that led there. query-apm-spans defaults to root spans only (rootSpans: true), so when the regressed operation is a child span (a DB or Client call), set flatSpans: true (and rootSpans: false) or the status_code = 2 + operation filter matches nothing — the aggregate flags the regression but you can never pull a sample to confirm it.

Latency p95 regression

Find operations where p95_duration_nano stepped up with steady count. Localize the cause: apm-spans-tree exposes per-(parent, child) edges — read calls_per_parent_invocation to separate a child that got slower per call from one that merely runs more times per parent. On a sample slow trace, sort spans by self_time_nano: a parent with a large self-time gap is uninstrumented work, not a slow child. apm-spans-duration-histogram reveals a second hump or fat tail = a distinct slow population worth isolating with a duration filter — but it buckets root-span duration only (root scoping is unconditional), so reserve it for root-operation latency; for a child-span regression use apm-spans-tree and query-apm-spans (flatSpans: true) instead.

When several operations in the same service (or sharing a subsystem — e.g. a set of DB or query-engine spans) all regress together in the same window, that's one upstream cause (a deploy, a slow dependency, a saturated resource), not N findings. Recognize the cluster and file a single report naming the shared cause with the operations as evidence, rather than one report per operation.

New error signature / failing dependency

An operation (or a downstream Client-kind span calling another service) newly erroring. Scope to the error set (status_code = 2) and run apm-attribute-breakdown on candidate keys — server.address, http.response.status_code, db.system, service.version. Scoped to the error set, the breakdown only describes the bad population, so it can't tell a real signature from a value that's simply everywhere: rerun the same breakdown without the status_code filter and compare shares. A value at ~95% of errors but a small share of total traffic is the signature; one at ~95% of both is just volume. A service.version that owns the errors but not the traffic points at a bad deploy.

Service traffic cliff

Compare apm-services-list and per-service apm-spans-sparkline against baseline memory: a service that emitted a steady span volume and dropped to ~0 is an instrumentation break or an outage (the trace-side analog of a capture cliff — spans are not retroactive). Guard against reading a partial current bucket as a cliff: confirm the drop spans ≥2 complete buckets.

Save memory as you go

Write a scratchpad entry whenever you observe something a future run should know. Encode the category in the key prefix — pattern: / noise: / addressed: / dedupe:. Domain label apm.

  • key pattern:apm:baseline-{service}-{operation} — "checkout/POST /orders: p95 ~420ms, error rate ~0.3%, ~1.2k req/h at this hour-of-week (2026-06-21)"
  • key dedupe:apm:{service}:{operation} — "Surfaced p95 regression on payments/charge (320ms→1.4s, count steady ~800/h) starting 2026-06-21 14:00 UTC. If still elevated next run, edit the report; if back under ~400ms, treat as recovered."
  • key noise:apm:{service} — "frontend/GET /healthz: high-volume readiness probe, ignore; deploy-window p95 blips recover within one bucket, don't report unless sustained ≥2 buckets."
  • key report:apm:{service}:{operation} — the report_id of a report you filed for a regression on this operation (error rate, p95, traffic cliff), so the next run edits it (append_note with the fresh window) instead of duplicating.
  • key reviewer:apm:{service} — a resolved owner (bare lowercase GitHub login) for a service, so reports route to a human faster.

Decide

The generic report mechanics — search the inbox first (via the report:apm:{service}:{operation} pointer, else an inbox-reports-list search on the specific service / operation, not a broad word like latency), edit-vs-author, the status rules, reviewer routing, non-idempotent dedup, and the priority / repository fields — live in the harness prompt and in authoring-scouts → references/report-contract.md. Do not re-derive them here. This section is only the APM judgment layered on top:

  • Edit when a still-live report already tracks the operation — an error rate still stepped up, a p95 still elevated, a service still dark. A persistent regression is one report across runs: a new complete bucket confirming it's ongoing is a re-escalation (append_note the fresh before/after numbers), not a fresh report per tick.
  • Author when nothing live covers the regression. A report-worthy finding names the concrete (service, operation), gives before/after numbers (rate or p95, with the steady denominator), dates the onset bucket, and explains the shape that rules out a volume explanation, with the query results in the evidence. These are investigations, not code fixes → actionability=requires_human_input. Priority: an active error-rate regression hitting many requests is P1; a contained latency regression P2; a single-dependency or low-traffic operation P3.
  • Bundle correlated operations into one report. When a cluster of operations in one service / subsystem regressed together, file one report for the shared cause, not one per operation — an inbox full of six reports for the same slow deploy is noise.
  • Remember if real but below the bar, or worth carrying forward (a fresh baseline, a blip to watch), or to record what you ruled out and why.
  • Skip with a one-line note if a noise: / addressed: / dedupe: entry, or an existing inbox report, already covers it with no material change.

Close out

One paragraph: which services/operations you scored, which reports you authored or edited, what you remembered (baselines, blips), what you ruled out (volume-tracking spikes, deploy blips, dev services). "Looked but found nothing meaningful" is a real outcome. Don't write a separate "run metadata" scratchpad entry — this summary already serves that role.

Disqualifiers (skip these)

  • Raw count tracking traffic. Количество ошибок или спанов растёт синхронно с запросами count (частота примерно постоянна) — это объём, а не регрессия. Это доминирующий ложноположительный случай; проверяйте его первым.
  • Всплески в окне деплоя. Разовый скачок p95 или ошибок в одном бакете, который сам восстанавливается. Запишите noise:/pattern: запись; сообщайте только если это сохраняется на протяжении ≥2 полных бакетов.
  • Высокие, но стабильные базовые уровни ошибок. Операция, которая ошибается с одинаковой повышенной частотой в обоих окнах (например, ~98% сейчас и ~98% неделю назад), — это постоянный базовый уровень, а не свежая регрессия — запишите это один раз в pattern:/noise: память и не сообщайте повторно при каждом запуске. Сигнал — это рост частоты ступенчато вверх, а не её абсолютный уровень.
  • Dev / тестовые сервисы. service.name или атрибут ресурса (deployment.environment, env) из dev / local / test / staging. Отфильтруйте перед оценкой.
  • Эндпоинты health-check / readiness. /health, /healthz, /ready, /livez и подобные — высокий объём, низкий сигнал. Добавьте их в allowlist в памяти.
  • Шум холодного старта / низкого трафика. Скачок p95 на операции с крошечным count (n слишком мал для стабильного перцентиля) обычно является холодным стартом или единственным медленным трейсом, а не трендом.
  • Кратковременные клиентские повторы. A Client спан, который ошибается, но его родитель в итоге завершается успешно (повтор удался) — не сообщайте, если только частота сбоев сама не растёт.
  • Аномалии одиночных трейсов. Один медленный или ошибочный трейс без повторений в окне.
  • Известные ошибки вышестоящего провайдера / БД уже покрытые памятью — сообщайте повторно только если частота или характер изменились существенно.

Если сомневаетесь, пишите в память вместо создания отчёта.

Инструменты MCP

Прямые (только чтение): apm-services-list, apm-spans-aggregate, apm-spans-sparkline, apm-spans-tree, apm-spans-duration-histogram, apm-attribute-breakdown, apm-attributes-list, apm-attribute-values-list, apm-spans-count, query-apm-spans, apm-trace-get.

Маршрутизация входящих и ревьюеров (механика в authoring-scouts → references/report-contract.md):

  • inbox-reports-list / inbox-reports-retrieve — отчёты, уже находящиеся во входящих; проверьте перед созданием, чтобы редактировать, а не дублировать.
  • inbox-report-artefacts-list — журнал артефактов сопоставимого отчёта; прецедент ревьюера.
  • scout-members-list — список участников текущего запуска для маршрутизации suggested_reviewers к владельцу сервиса.

На уровне harness: scout-project-profile-get, scout-scratchpad-search, scout-runs-list, scout-runs-retrieve, scout-emit-report / scout-edit-report (создать / отредактировать отчёт — контракт канала отчётов описан в промпте harness), scout-scratchpad-remember, scout-scratchpad-forget. Опирайтесь на встроенный exploring-apm-traces навык для форм запросов, перечислений kind/status_code и скриптов разбора трейсов.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: signals-scout-apm](https://darkplay.ru/ai/skills/posthog-posthog-signals-scout-apm)

Из того же репозитория

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

lushaanthropics · Поиск, обогащение и формирование списков лидов для звонков на платформе B2B-аналитики…
100 комп.
lushaanthropics · Поиск, обогащение и формирование готовых к обзвону списков лидов на платформе…
233 комп.
Defender Scout KQLgithub · Генерирует, проверяет и оптимизирует запросы KQL для Microsoft Defender XDR Advanced…
36 140 ★
chief-customer-officer-advisoralirezarezvani · Советник Chief Customer Officer: анализ удержания (GRR vs NRR, таксономия оттока)…
510 комп.
research-orchestratoralirezarezvani · Оркестратор исследований: маршрутизация к 6 специалистам или собственный 8-шаговый план.
510 комп.
porters-five-forcesdeanpeters · Разобрать структуру отрасли через пять сил Портера с документированными сигналами и…
8 061 ★
proto-personadeanpeters · Создать прото-персону на основе текущих исследований, рыночных сигналов и знаний команды.
8 061 ★
achilles-ep-delphianthropics · Инфраструктура безопасности агентов (RiskOracle, NoLeak, MemGuard, SecureExec, FlowCore)…
38 комп.
algovault-skillsanthropics · Мозговой слой для ИИ-агентов торговли: 20 навыков через MCP AlgoVault — сигналы…
38 комп.
audit-projectanthropics · Итеративное мультиагентное код-ревью до нуля замечаний с 10 специализированными…
38 комп.

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8