Skip to content

feat(metrics): investigating-metric-anomalies skill#63132

Open
DanielVisca wants to merge 1 commit into
posthog-code/metrics-mcp-characterizefrom
posthog-code/metrics-investigation-skill
Open

feat(metrics): investigating-metric-anomalies skill#63132
DanielVisca wants to merge 1 commit into
posthog-code/metrics-mcp-characterizefrom
posthog-code/metrics-investigation-skill

Conversation

@DanielVisca

@DanielVisca DanielVisca commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Problem

The metrics MCP tools are atomic by design; the investigation knowledge — what order to call them in, how to read the results, when to pivot into logs and traces — needs to live somewhere agents load on demand.

Changes

products/metrics/skills/investigating-metric-anomalies/SKILL.md: the playbook from symptom to evidence — pin the metric (metric-names-list), characterize first (one call: magnitude, onset, movers), sharpen hypotheses with targeted query-metrics calls (mover drill-down, formula normalization, companion metrics), correlate logs and traces at onset_time, conclude with evidence. Includes a worked "ingestion lag is rising" example and a pitfalls list (counter resets, emitter-died-vs-zero, avg-hides-p95, scrape delay).

How did you test this code?

I'm an agent. hogli lint:skills passes (78 skills). The worked example is not hypothetical — it's the transcript shape of a real induced incident investigated through the MCP tools (see #63131's test notes).

🤖 Agent context

Autonomy: Human-driven (agent-assisted) — directed by @DanielVisca

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(metrics): investigating-metric-anom..." | Re-trigger Greptile

@DanielVisca DanielVisca force-pushed the posthog-code/metrics-mcp-characterize branch from 4c1ea15 to 53cc0f6 Compare June 11, 2026 21:33
@DanielVisca DanielVisca force-pushed the posthog-code/metrics-investigation-skill branch from a9574c6 to 6174e1a Compare June 11, 2026 21:33
@DanielVisca DanielVisca added the stamphog Request AI review from stamphog label Jun 11, 2026 — with Graphite App
github-actions[bot]
github-actions Bot previously approved these changes Jun 11, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New skill documentation file only — no production code, no migrations, no API changes. Author is on the owning team.

@DanielVisca DanielVisca force-pushed the posthog-code/metrics-mcp-characterize branch from 1752d82 to 06bae3f Compare June 11, 2026 22:36
@DanielVisca DanielVisca force-pushed the posthog-code/metrics-investigation-skill branch from 6174e1a to 6a6d38e Compare June 11, 2026 22:36
@github-actions github-actions Bot dismissed their stale review June 11, 2026 22:37

New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.

github-actions[bot]
github-actions Bot previously approved these changes Jun 11, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New agent skill documentation file only — no production code, no migrations, no API changes. Content is valid markdown matching the .md extension, and the author is on the owning team.

The repeatable incident playbook for "metric X looks wrong": pin the
metric (metric-names-list), characterize first (one call for magnitude,
onset, movers), sharpen hypotheses with targeted query-metrics calls
(filters, formula normalization, companion metrics), correlate logs and
traces at onset_time, and conclude with evidence. Includes a worked
"ingestion lag is rising" example reproduced against a real induced
local incident (consumer outage -> backlog drain) where the playbook
identified direction, onset within one bucket of the restart, and the
exact culprit service via top_movers.

How to validate manually:
- hogli lint:skills
- follow the worked example with the local stack: stop ingestion-logs
  for a few minutes, restart it, then run the three MCP calls in order

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DanielVisca DanielVisca force-pushed the posthog-code/metrics-mcp-characterize branch from 79d8ba1 to eebda3f Compare June 11, 2026 23:44
@DanielVisca DanielVisca force-pushed the posthog-code/metrics-investigation-skill branch from 6a6d38e to 8dd4038 Compare June 11, 2026 23:44
@github-actions github-actions Bot dismissed their stale review June 11, 2026 23:45

New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure markdown skill documentation file, no production code, no dependencies or API contracts touched, authored by a team member in their own ownership area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI review from stamphog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant