Agent skill · data analytics · jeremylongshore

klaviyo-observability

Set up observability for Klaviyo integrations with metrics, traces,

Why this skill is useful

Provides specific Prometheus metrics and alerting rules tailored for Klaviyo API operations that the AI wouldn't reliably generate on its own.

What it needs

Requires grafana, klaviyo-api, opentelemetry, prometheus installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Klaviyo Observability Overview Comprehensive observability for Klaviyo integrations: Prometheus metrics for API call tracking, OpenTelemetry tracing, structured logging, and alerting rules tuned to Klaviyo's rate limits and error patterns. The pattern centers on one instrumentation wrapper that every Klaviyo call routes through, so metrics, traces, and logs stay consistent across profiles, events, and webhooks. Prerequisites Prometheus or compatible metrics backend OpenTelemetry SDK installed (optional) Grafana or similar dashboarding tool (optional) klaviyo-api SDK installed Key Metrics to Track Metric Type Why It Matters -------- ------ --------------- klaviyoapirequeststotal Counter Track total API volume by endpoint klaviyoapidurationseconds Histogram Detect latency degradation klaviyoapierrorstotal Counter 4xx/5xx error rates klaviyoratelimitremaining Gauge Predict when you'll hit 429s klaviyoprofilessyncedtotal Counter Profile sync throughput klaviyoeventstrackedtotal Counter Event tracking volume klaviyowebhookreceivedtotal Counter Inbound webhook volume Instructions Read any existing Klaviyo client code first, then build the layers in order. Each step writes one module; steps 5–6 wire the alerting and scrape endpoint. 1. Instrumented API wrapper — write src/klaviyo/instrumented-client.ts with the Prometheus counters, histogram, and gauge, exposed through a single instrumentedCall() helper. 2. Route every call through instrumentedCall(endpoint, method, () => ...) in the service layer so profile/event/webhook traffic is all counted. 3. OpenTelemetry tracing (optional) — add tracedKlaviyoCall() to emit spans with Klaviyo operation + error attributes. 4. Structured logging — add a pino logger with an email-redacting serializer. 5. Alert rules — drop prometheus/klaviyo-alerts.yml in place for error-rate, 429, latency, down, and low-headroom alerts. 6. Metrics endpoint — expose GET /metrics from the shared registry. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/klaviyo-observability

View the source on GitHub

Browse the @skills marketplace