CtrlK
BlogDocsLog inGet started
Tessl Logo

instrumenting-first-party-metrics

How to instrument PostHog's own Metrics product from PostHog-owned code — record counters, gauges, and histograms that land in posthog.metrics, the same way customers do. Use when adding application metrics in this monorepo (web, Celery, Temporal), when asked to push or ship metrics into posthog metrics, or when unsure whether the SDK in this environment supports posthog.metrics yet. Covers the environment decision (SDK-first per the public docs, OTel fallback when the SDK path is not available), the exact version gates per SDK, what is already wired internally, and how to validate metrics actually arrive.

72

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable and well-structured with strong validation guidance and clean progressive disclosure. Minor conciseness trims and an explicit error-recovery loop in validation would lift it further.

Suggestions

Tighten the Step 4 dev/test gotchas and the bin/verify-metrics-pipe caveat — the qualifying clauses can be shortened without losing the operational signal.

Add an explicit error-recovery feedback loop to validation (e.g., 'if the metric does not appear within ~1 min, check the version gate and OTEL_METRICS_EXPORT_* values, then re-query').

The Node-services row gives no executable snippet; consider a one-line example mirroring the internal twin file or explicitly state that no snippet is needed because services don't run posthog-node.

DimensionReasoningScore

Conciseness

Dense and operational with no basic-concept padding; tables and code blocks earn their place, though a few prose passages (Step 4 dev/test gotchas, the verify-script caveat) could be tightened.

4 / 5

Actionability

Copy-paste SDK and OTel-factory snippets, a grep version-gate command, an SQL arrival check, MCP tool names, and named reference call sites — fully executable, covering the common cases.

5 / 5

Workflow Clarity

Clear four-step sequence (identify env, version gate, instrument, validate) with a thorough validation step, but it offers observation guidance rather than an explicit error-recovery feedback loop.

4 / 5

Progressive Disclosure

Well-organized into clean sections with one-level-deep references (public docs URL, posthog/otel_metrics.py, named call sites); no nested references or inlined bulk content despite the absence of bundle files.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is specific, complete, and distinctive, with explicit trigger guidance and concrete actions. Trigger-term quality is strong but slightly jargon-heavy, keeping it just short of maximal breadth.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'record counters, gauges, and histograms that land in posthog.metrics', 'validate metrics actually arrive', 'environment decision', 'version gates' — with comprehensive coverage.

5 / 5

Completeness

Explicitly answers what ('record counters, gauges, and histograms that land in posthog.metrics') and when via a concrete 'Use when...' clause plus a 'Covers...' scope sentence.

5 / 5

Trigger Term Quality

Good natural keyword coverage for the audience ('adding application metrics', 'push or ship metrics into posthog metrics'), but leans on internal jargon and misses some synonyms, so not a full 5.

4 / 5

Distinctiveness Conflict Risk

A clear niche — PostHog's own Metrics product from PostHog-owned code in the monorepo (web, Celery, Temporal) landing in posthog.metrics — with distinct triggers and minimal conflict risk.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.