Agent skill · data analytics · jeremylongshore

shopify-observability

Set up observability for Shopify app integrations with query cost tracking,

Why this skill is useful

Adds executable scripts for tracking Shopify-specific metrics and alerting that are not covered in generic observability documentation.

What it needs

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

What this skill does

Shopify Observability Overview Instrument your Shopify app to track GraphQL query cost, rate limit consumption, webhook delivery success, and API latency. Shopify-specific metrics that generic monitoring misses. Prerequisites Prometheus or compatible metrics backend pino or similar structured logger Shopify API client with response interception Instructions Step 1: Shopify-Specific Metrics Define Prometheus counters, histograms, and gauges for query cost, rate limit headroom, REST bucket state, API duration, webhook processing, and error classification. See Shopify Metrics Definitions for the complete metric registrations. Step 2: Instrumented GraphQL Client Wrap the Shopify GraphQL client to automatically record query cost from extensions.cost, update rate limit gauges, and classify errors (throttled, auth, API error). See Instrumented GraphQL Client for the complete implementation. Step 3: REST API Header Tracking Parse X-Shopify-Shop-Api-Call-Limit headers (e.g., "32/40") from REST responses to track leaky bucket fill level. Warn when bucket exceeds 80% capacity. Step 4: Webhook Observability Track HMAC validation results, processing success/failure, and duration for all incoming webhooks. See Webhook Observability for the complete Express middleware. Step 5: Structured Logging Pino-based logger with automatic PII redaction and Shopify-specific context fields (query cost, available points, operation name). See Structured Logging for the complete implementation. Step 6: Alert Rules Prometheus alert rules for low rate limits, high query cost (P95 > 500), webhook failures (> 10%), and API latency (P95 > 3s). See Alert Rules for the complete Prometheus configuration. …

How to use it

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

@skills jeremylongshore/shopify-observability

View the source on GitHub

Browse the @skills marketplace