Skip to content
Skills Library
DevOps & cloud · Tool integration

shopify-observability

/shopify-observability

Set up observability for Shopify app integrations with query cost tracking, rate limit monitoring, webhook delivery metrics, and structured logging. Use when instrumenting a Shopify app for production monitoring, setting up Prometheus metrics for API health, or configuring alerts for rate limit issues. Trigger with phrases like "shopify monitoring", "shopify metrics", "shopify observability", "monitor shopify API", "shopify alerts", "shopify dashboard".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
6
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Set up observability for Shopify app integrations with query cost tracking, rate limit monitoring, webhook delivery metrics, and structured logging. Use when instrumenting a Shopify app for production monitoring, setting up Prometheus metrics for API health, or configuring alerts for rate limit issues. Trigger with phrases like "shopify monitoring", "shopify metrics", "shopify observability", "monitor shopify API", "shopify alerts", "shopify dashboard".

Triggers from the description

shopify monitoringshopify metricsshopify observabilitymonitor shopify APIshopify alertsshopify dashboard
Original author description

Set up observability for Shopify app integrations with query cost tracking, rate limit monitoring, webhook delivery metrics, and structured logging. Use when instrumenting a Shopify app for production monitoring, setting up Prometheus metrics for API health, or configuring alerts for rate limit issues. Trigger with phrases like "shopify monitoring", "shopify metrics", "shopify observability", "monitor shopify API", "shopify alerts", "shopify dashboard".

How it works

  1. Overview
  2. Prerequisites
  3. Instructions
  4. Output
  5. Error Handling
  6. Examples
  7. Resources
Original SKILL.md headings · 95 lines, 422 words
SKILL.md preview
---
name: shopify-observability
description: 'Set up observability for Shopify app integrations with query cost tracking,

  rate limit monitoring, webhook delivery metrics, and structured logging.

  Use when instrumenting a Shopify app for production monitoring, setting up

  Prometheus metrics for API health, or configuring alerts for rate limit issues.

  Trigger with phrases like "shopify monitoring", "shopify metrics",

  "shopify observability", "monitor shopify API", "shopify alerts", "shopify dashboard".

  '
allowed-tools: Read, Write, Edit
version: 2.7.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- ecommerce
- shopify
compatibility: Designed for Claude Code
---
# 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](references/shopify-metrics-definitions.md) 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](references/instrumented-graphql-client.md) 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.

```typescript
function trackRestHeaders(shop: string, headers: Record<string, string>): void {
  const callLimit = headers["x-shopify-shop-api-call-limit"];
  if (callLimit) {
    const [used, max] = callLimit.split("/").map(Number);
    restBucketGauge.set({ shop }, used);
    if (used > max * 0.8) {
      console.warn(`[shopify] REST bucket at ${used}/${max} for ${shop}`);
    }
  }
}
```

### Step 4: Webhook Observability

Track HMAC validation results, processing success/failure, and duration for all incoming webhooks.

See [Webhook Observability](references/webhook-observability.md) 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](references/structured-logging.md) 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](references/alert-rules.md) for the complete Prometheus configuration.

## Output

- GraphQL query cost tracking with per-operation metrics
- Rate limit monitoring for both REST and GraphQL
- Webhook delivery and processing metrics
- Structured logs with automatic PII redaction
- Alert rules for critical Shopify-specific conditions

## Error Handling

| Issue | Cause | Solution |
|-------|-------|----------|
| Missing cost data | Query error before response | Check error handling wraps correctly |
| High cardinality | Per-shop labels | Aggregate by plan tier instead |
| Alert storms | Aggressive thresholds | Tune based on baseline traffic |
| Webhook metrics missing | Not instrumented | Add counter to webhook handler |

## Examples

### Metrics Endpoint

```typescript
app.get("/metrics", async (req, res) => {
  res.set("Content-Type", registry.contentType);
  res.send(await registry.metrics());
});
```

## Resources

- [Shopify Rate Limit Headers](https://shopify.dev/docs/api/usage/rate-limits)
- [Prometheus Best Practices](https://prometheus.io/docs/practices/naming/)
- [OpenTelemetry Node.js](https://opentelemetry.io/docs/instrumentation/js/)
Files in this package (6)
  • SKILL.md 4 KB
  • references/alert-rules.md 1 KB
  • references/instrumented-graphql-client.md 1 KB
  • references/shopify-metrics-definitions.md 2 KB
  • references/structured-logging.md 1 KB
  • references/webhook-observability.md 1 KB

Versions

The database has no other skills named shopify-observability.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version a56d9188ec34 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100intercom-observability
    Use when you need production monitoring for an Intercom integration — instrumenting API calls with metrics and traces, standing up dashboards, or wiring alerts for error rate, latency, and rate-limit health. Set up observability for Intercom integrations with Prometheus metrics,…
  • 100figma-observability
    Set up monitoring, metrics, and alerting for Figma API integrations. Use when implementing observability for Figma operations, tracking API health, or configuring alerts for rate limits and errors. Trigger with phrases like "figma monitoring", "figma metrics", "figma…
  • 100customerio-observability
    Set up Customer.io monitoring and observability. Use when implementing metrics, logging, alerting, or dashboards for Customer.io integrations. Trigger with phrases like "customer.io monitoring", "customer.io metrics", "customer.io dashboard", "customer.io alerts".
  • 100perplexity-observability
    Set up comprehensive observability for Perplexity integrations with metrics, traces, and alerts. Use when implementing monitoring for Perplexity operations, setting up dashboards, or configuring alerting for Perplexity integration health. Trigger with phrases like "perplexity…
  • 100ops
    Post-deploy observability for production services — structured logging, RED metrics + Prometheus, Grafana dashboards, SLO-based alerting. Use when setting up monitoring or instrumenting a live service. Trigger on "add logging", "metrics", "dashboard", "alerting",…
  • 100monitoring-observability
    Observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing, and drift detection. Use when adding logging, metrics, distributed tracing, LLM cost tracking, or quality drift monitoring.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.