
Monitoring Alerting Commerce
- 67 installs
- 41 repo stars
- Updated March 13, 2026
- finsilabs/awesome-ecommerce-skills
Track store health in real time with dashboards for checkout success rate, payment failures, and cart errors plus custom SLO alerting.
About
Sets up real-time monitoring and alerting for commerce KPIs like checkout success rate, payment failures, and cart errors with SLO-based alerts. A developer uses it to catch revenue-impacting incidents before customers report them.
- Dashboards for checkout success, payment failures, and cart errors
- Custom SLO-based alerting
Monitoring Alerting Commerce by the numbers
- 67 all-time installs (skills.sh)
- Ranked #628 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill monitoring-alerting-commerceAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 67 |
|---|---|
| repo stars | ★ 41 |
| Last updated | March 13, 2026 |
| Repository | finsilabs/awesome-ecommerce-skills ↗ |
What it does
Track store health in real time with dashboards for checkout success rate, payment failures, and cart errors plus custom SLO alerting.
Files
Monitoring & Alerting — Commerce
Overview
Generic infrastructure monitoring (CPU, memory, error rate) is insufficient for e-commerce — you need commerce-domain metrics: checkout funnel conversion rates, payment success/failure breakdown by gateway and card type, cart abandonment rates, and inventory out-of-stock events. This skill covers setting up monitoring across different platforms and instrumenting custom storefronts with OpenTelemetry, building dashboards for commerce KPIs, and setting up alerts that fire before revenue impact becomes visible in sales reports.
When to Use This Skill
- When setting up observability for a new headless storefront or commerce service
- When an incident occurred and you had no alerting in place to catch it early
- When you need real-time visibility into checkout performance and payment failures
- When diagnosing a drop in conversion rate that may be caused by a technical issue
- When preparing SLOs (Service Level Objectives) for the checkout flow before a major sale
Core Instructions
Step 1: Determine your platform and what you can monitor
| Platform | Built-In Monitoring | What You Can Add |
|---|---|---|
| Shopify | Shopify admin shows orders, conversion rates, and a performance report with Core Web Vitals | Install Lucky Orange or Microsoft Clarity for session recordings and funnel drop-off; connect Shopify to Google Analytics 4 for detailed checkout funnel tracking |
| WooCommerce | WooCommerce analytics dashboard shows orders and revenue; no performance monitoring built in | Install MonsterInsights (GA4 integration), WooFunnels (checkout funnel tracking), and set up Uptime Robot (free tier: 50 monitors) for availability alerting |
| BigCommerce | BigCommerce Analytics shows orders, conversion rate, and abandoned carts | Connect BigCommerce to GA4 via native integration; use Lucky Orange for heatmaps and session recordings on checkout pages |
| Custom / Headless | Nothing — you build it | Instrument with OpenTelemetry, ship metrics to Grafana Cloud (free tier: 10K series) or Datadog; build checkout funnel dashboards with PromQL; see implementation below |
Step 2: Platform-specific monitoring setup
---
Shopify
Set up GA4 checkout funnel tracking:
1. In your Shopify admin, go to Online Store → Preferences → Google Analytics 2. Connect your GA4 property — Shopify sends all standard e-commerce events automatically (page_view, add_to_cart, begin_checkout, purchase) 3. In Google Analytics → Explore, create a funnel exploration:
- Step 1:
begin_checkoutevent - Step 2:
add_shipping_infoevent - Step 3:
add_payment_infoevent - Step 4:
purchaseevent - This shows you exactly where shoppers are dropping off in checkout
Monitor your store's Core Web Vitals:
1. Go to Online Store → Themes and click View report 2. This shows real-user LCP, CLS, and FID data from actual shoppers 3. A poor mobile LCP score (red, > 4s) almost always means your hero image needs optimization or fetchpriority="high"
Set up availability and error alerting:
1. Install Lucky Orange ($19/month) or Microsoft Clarity (free) to capture session recordings when checkout errors occur — this shows exactly what shoppers see when something breaks 2. Set up a Shopify Email or Slack notification for failed orders: go to Settings → Notifications and enable the Order payment failure notification 3. For uptime monitoring: use Uptime Robot (free, 5-minute checks) or Better Uptime to alert you if your store URL becomes unreachable
---
WooCommerce
Connect WooCommerce to GA4:
1. Install MonsterInsights (free tier available, Pro from $99/year) from wordpress.org 2. Go to Insights → Settings → General and connect your GA4 property 3. Enable Enhanced eCommerce tracking — this sends add_to_cart, begin_checkout, and purchase events to GA4 automatically
Track checkout funnel drop-off:
1. Install WooFunnels (free tier available) from wordpress.org 2. Create a funnel with your cart, checkout, and order confirmation pages as steps 3. WooFunnels shows you the conversion rate at each step and where shoppers abandon
Set up uptime and error alerting:
1. Sign up for Uptime Robot (free tier: 50 monitors, 5-minute checks) 2. Add monitors for your homepage, shop page, checkout page, and /wp-admin/admin-ajax.php (WooCommerce uses this heavily) 3. Set up email or Slack notifications when any monitor goes down
Monitor server health:
1. In your hosting control panel (cPanel, Cloudways, Kinsta), enable email alerts for:
- PHP error logs (fatal errors)
- Disk usage above 80%
- Memory usage above 80%
2. Install Query Monitor plugin (free, wordpress.org) in a staging environment to identify slow database queries during development — disable on production
---
Custom / Headless
For custom storefronts, implement a full observability stack: OpenTelemetry for instrumentation, Prometheus or Grafana Cloud for metrics storage, and Grafana for dashboards.
Define commerce SLOs before building dashboards — these become your alert thresholds:
| Metric | Target | Alert threshold |
|---|---|---|
| Payment success rate | 95% | < 90% for 2 min |
| Checkout P99 latency | < 3000ms | > 5000ms for 3 min |
| Checkout availability | 99.9% | Zero starts for 2 min |
| Catalog page P95 | < 1000ms | > 2000ms for 5 min |
Instrument your storefront with OpenTelemetry:
npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node \
@opentelemetry/exporter-metrics-otlp-http @opentelemetry/exporter-trace-otlp-http \
@opentelemetry/sdk-metrics// instrumentation.ts — import before any other module
import { NodeSDK } from '@opentelemetry/sdk-node';
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http';
import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics';
const sdk = new NodeSDK({
serviceName: 'commerce-storefront',
traceExporter: new OTLPTraceExporter({ url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT }),
metricReader: new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({ url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT }),
exportIntervalMillis: 15000,
}),
instrumentations: [getNodeAutoInstrumentations({
'@opentelemetry/instrumentation-http': { enabled: true },
'@opentelemetry/instrumentation-pg': { enabled: true },
'@opentelemetry/instrumentation-ioredis': { enabled: true },
})],
});
sdk.start();Track checkout funnel metrics:
// lib/metrics/checkout-metrics.ts
import { metrics } from '@opentelemetry/api';
const meter = metrics.getMeter('commerce-checkout');
const checkoutStarted = meter.createCounter('checkout.started');
const checkoutCompleted = meter.createCounter('checkout.completed');
const paymentAttempts = meter.createCounter('payment.attempts');
const paymentSuccesses = meter.createCounter('payment.successes');
const paymentFailures = meter.createCounter('payment.failures');
const orderCreationDuration = meter.createHistogram('order.creation.duration_ms', {
boundaries: [100, 250, 500, 1000, 2000, 5000, 10000],
});
export const checkoutMetrics = {
recordCheckoutStart(channel: string) {
checkoutStarted.add(1, { channel });
},
recordCheckoutComplete(channel: string, paymentMethod: string) {
checkoutCompleted.add(1, { channel, payment_method: paymentMethod });
},
recordPaymentAttempt(gateway: string, method: string) {
paymentAttempts.add(1, { gateway, method });
},
recordPaymentSuccess(gateway: string, method: string) {
paymentSuccesses.add(1, { gateway, method });
},
recordPaymentFailure(gateway: string, declineCode: string) {
paymentFailures.add(1, { gateway, decline_code: declineCode });
},
recordOrderCreation(durationMs: number, channel: string) {
orderCreationDuration.record(durationMs, { channel });
},
};PromQL queries for Grafana dashboard panels:
# Payment success rate (gauge panel — target 95%)
rate(payment_successes_total[5m])
/
(rate(payment_successes_total[5m]) + rate(payment_failures_total[5m]))
# Checkout P99 latency
histogram_quantile(0.99,
sum(rate(order_creation_duration_ms_bucket[5m])) by (le, channel)
)
# Checkout funnel conversion rate
rate(checkout_completed_total[1h]) / rate(checkout_started_total[1h])
# Payment failures by decline code (top 5)
topk(5, sum(rate(payment_failures_total[5m])) by (decline_code))Prometheus alerting rules:
# prometheus/commerce-alerts.yaml
groups:
- name: commerce-critical
rules:
- alert: PaymentSuccessRateLow
expr: |
(
rate(payment_successes_total[5m]) /
(rate(payment_successes_total[5m]) + rate(payment_failures_total[5m]))
) < 0.90
for: 2m
labels:
severity: critical
annotations:
summary: "Payment success rate below 90%"
description: "Rate is {{ $value | humanizePercentage }}. Check Stripe status page and recent deployments."
runbook: "https://wiki.mystore.com/runbooks/payment-failures"
- alert: CheckoutHighLatency
expr: |
histogram_quantile(0.99,
sum(rate(order_creation_duration_ms_bucket[5m])) by (le)
) > 5000
for: 3m
labels:
severity: warning
annotations:
summary: "Checkout P99 latency above 5 seconds"
description: "P99 is {{ $value }}ms. Check database slow query log and Redis connection pool."
- alert: CheckoutServiceDown
expr: rate(checkout_started_total[5m]) == 0
for: 2m
labels:
severity: critical
annotations:
summary: "No checkouts being started — possible service outage"Add Real User Monitoring for Core Web Vitals:
// lib/rum.ts — initialize in root layout
import { onCLS, onINP, onLCP, onFCP, onTTFB } from 'web-vitals';
function sendVital(metric: any) {
navigator.sendBeacon?.('/api/rum/vitals', JSON.stringify({
name: metric.name,
value: metric.value,
rating: metric.rating, // 'good', 'needs-improvement', 'poor'
page: window.location.pathname,
}));
}
export function initRUM() {
onCLS(sendVital);
onINP(sendVital);
onLCP(sendVital);
onFCP(sendVital);
onTTFB(sendVital);
}Best Practices
- Alert on symptoms, not causes — alert on "payment success rate < 90%" (a symptom affecting revenue), not "Stripe API latency > 500ms" (a cause); symptom-based alerts fire faster and are more actionable
- Track checkout funnel step-by-step — instrument each step (cart → checkout → payment → confirmation) separately so you can identify exactly where users drop off
- Monitor decline codes, not just failure counts — a 10% failure rate dominated by
insufficient_fundsis different fromdo_not_honor(possible fraud or issuer outage); they require completely different responses - Use synthetic monitoring for availability — RUM depends on real traffic; scheduled synthetic checkout flows (Playwright + Lambda) catch outages at 3 AM before customers do
- Link runbooks in every alert — every alert annotation should include a
runbookURL pointing to a page describing how to diagnose and resolve that specific condition - Set `for` duration to avoid alert flapping — a 30-second latency spike is normal; alerts with
for: 2monly fire if the condition is sustained
Common Pitfalls
| Problem | Solution |
|---|---|
| Too many alerts, low signal-to-noise | Start with 3–5 high-value alerts (payment failures, checkout latency, service down); add more only after validating each fires at the right threshold |
| Metrics not recorded when errors occur | Instrument metrics before and after error-prone operations; a failed payment should still increment payment.failures even if it throws an exception |
| Dashboard looks healthy but revenue is down | Add business metrics (orders per minute, revenue per hour) alongside technical metrics; technical SLOs can be met while UX issues suppress conversion |
| RUM data skewed by bots | Filter RUM events by user agent; bot traffic distorts Core Web Vitals and can hide real user performance regressions |
| Shopify GA4 funnel shows no data | Verify that the GA4 Measurement ID in Online Store → Preferences matches your GA4 property; check the GA4 DebugView to confirm events are firing |
Related Skills
- @flash-sale-scaling
- @load-testing-commerce
- @database-optimization-commerce
- @edge-commerce
{
"context": "Tests whether the agent designs a commerce alert rule set that follows symptom-based alerting principles, uses appropriate `for` durations, includes runbook annotations, applies multi-window burn-rate SLO alerting, monitors decline codes specifically, and correctly handles production vs staging routing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Symptom-based alerting",
"max_score": 10,
"description": "ALERTING_DESIGN.md explicitly describes the alerting philosophy as symptom-based (alerting on customer-visible outcomes like payment success rate or checkout availability) rather than cause-based (e.g., Stripe API latency, Redis latency)"
},
{
"name": "Payment success rate alert",
"max_score": 9,
"description": "commerce-alerts.yaml includes an alert rule on payment success rate falling below a threshold (using rate(payment_successes_total) / (rate(payment_successes_total) + rate(payment_failures_total)))"
},
{
"name": "Payment success rate threshold",
"max_score": 5,
"description": "The payment success rate alert fires at a threshold of < 0.90 (90%)"
},
{
"name": "Latency alert",
"max_score": 6,
"description": "commerce-alerts.yaml includes an alert on P99 order creation latency exceeding a threshold using histogram_quantile(0.99, ...order_creation_duration_ms_bucket...)"
},
{
"name": "Service down alert",
"max_score": 6,
"description": "commerce-alerts.yaml includes an alert that fires when rate(checkout_started_total[5m]) == 0 (no checkout activity)"
},
{
"name": "Cart abandonment alert",
"max_score": 6,
"description": "commerce-alerts.yaml includes a cart abandonment rate alert (rate(checkout_abandoned_total) / rate(checkout_started_total) exceeding a threshold)"
},
{
"name": "for: durations present",
"max_score": 6,
"description": "Every alert rule in commerce-alerts.yaml has a non-zero `for:` duration (no alert fires immediately on first evaluation)"
},
{
"name": "Runbook annotations",
"max_score": 6,
"description": "At least two alert rules in commerce-alerts.yaml include a `runbook` annotation with a URL"
},
{
"name": "Decline code monitoring",
"max_score": 8,
"description": "ALERTING_DESIGN.md or commerce-alerts.yaml addresses monitoring payment failures broken down by decline_code (not just aggregate failure count), explaining that different decline codes require different responses"
},
{
"name": "Multi-window burn-rate",
"max_score": 10,
"description": "ALERTING_DESIGN.md describes or commerce-alerts.yaml implements multi-window burn-rate alerting with both a short window (1h) and a longer window (6h) for SLO error budget consumption"
},
{
"name": "Alert count discipline",
"max_score": 6,
"description": "ALERTING_DESIGN.md explicitly addresses limiting the initial alert set to a small number of high-value alerts (mentions starting with a focused set of 3–5 alerts covering the most impactful failure modes)"
},
{
"name": "Prod vs staging routing",
"max_score": 7,
"description": "routing.yaml or ALERTING_DESIGN.md includes separate routing rules for production vs staging environments"
},
{
"name": "Staging suppression",
"max_score": 8,
"description": "routing.yaml or ALERTING_DESIGN.md describes suppressing staging alerts outside business hours (e.g., using time_intervals or inhibition rules)"
},
{
"name": "Severity labels",
"max_score": 7,
"description": "Alert rules in commerce-alerts.yaml include `severity` labels (critical or warning) that differentiate between impactful outages and degraded performance"
}
]
}
Set Up Commerce Payment Alerting
Problem/Feature Description
A payments engineering team at an online retailer is being overwhelmed by noisy, low-value alerts that have led to alert fatigue. Their on-call engineers are getting paged for things like "Redis latency spike" or "Stripe API response time > 200ms" — causes that may or may not be affecting customers — rather than being told directly that customers cannot complete purchases. The team has also been caught off-guard by slow-burning incidents: a payment success rate that degraded from 95% to 88% over 4 hours went unnoticed because no alert covered the gradual drift.
The team wants to rebuild their alerting from scratch with a focused, high-signal rule set. They use Prometheus and Alertmanager. The storefront already emits the metrics: payment_successes_total, payment_failures_total (with gateway and decline_code labels), checkout_started_total, checkout_abandoned_total, and order_creation_duration_ms_bucket. They run both a production and staging environment and have been burned before by staging alerts waking engineers at 2 AM.
Output Specification
Produce the following files:
1. alertmanager/commerce-alerts.yaml — Prometheus alert rule groups for commerce 2. alertmanager/routing.yaml — Alertmanager routing configuration handling production vs staging 3. ALERTING_DESIGN.md — A short design document (1–2 pages) explaining:
- The alerting philosophy used (what conditions were chosen and why)
- How the alert set avoids common pitfalls
- Any advanced alerting strategies applied to protect the error budget
{
"context": "Tests whether the agent builds a Grafana commerce dashboard with the required panel types and correct PromQL queries, including both business and technical KPI panels as prescribed by the skill.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Checkout funnel panel",
"max_score": 7,
"description": "dashboard-notes.md or dashboard JSON includes a checkout funnel panel (described as Sankey, bar chart, or funnel visualization showing cart-to-confirmation drop-off)"
},
{
"name": "Payment success rate gauge",
"max_score": 7,
"description": "dashboard-notes.md or dashboard JSON includes a payment success rate panel using a gauge visualization (not time series or stat)"
},
{
"name": "Revenue per hour panel",
"max_score": 7,
"description": "dashboard-notes.md or dashboard JSON includes a revenue per hour panel using a time series visualization"
},
{
"name": "Decline code pie chart",
"max_score": 7,
"description": "dashboard-notes.md or dashboard JSON includes a payment failures by decline code panel using a pie chart visualization"
},
{
"name": "Latency time series panel",
"max_score": 7,
"description": "dashboard-notes.md or dashboard JSON includes an order creation latency panel showing P50/P95/P99 as a time series"
},
{
"name": "Abandonment rate stat panel",
"max_score": 8,
"description": "dashboard-notes.md or dashboard JSON includes a checkout abandonment rate panel using a stat panel visualization"
},
{
"name": "Active carts gauge",
"max_score": 5,
"description": "dashboard-notes.md or dashboard JSON includes an active carts panel using a gauge visualization"
},
{
"name": "Out of stock counter",
"max_score": 5,
"description": "dashboard-notes.md or dashboard JSON includes an out of stock events panel"
},
{
"name": "Payment success rate PromQL",
"max_score": 10,
"description": "dashboard-notes.md or dashboard JSON uses a PromQL query dividing rate(payment_successes_total[...]) by (rate(payment_successes_total[...]) + rate(payment_failures_total[...])) for the payment success rate panel"
},
{
"name": "P99 latency PromQL",
"max_score": 10,
"description": "dashboard-notes.md or dashboard JSON uses histogram_quantile(0.99, sum(rate(order_creation_duration_ms_bucket[...])) by (le, ...)) for the latency panel"
},
{
"name": "Checkout conversion PromQL",
"max_score": 8,
"description": "dashboard-notes.md or dashboard JSON uses rate(checkout_completed_total[1h]) / rate(checkout_started_total[1h]) (with 1h window) for the checkout conversion panel"
},
{
"name": "Decline code topk PromQL",
"max_score": 10,
"description": "dashboard-notes.md or dashboard JSON uses topk(5, sum(rate(payment_failures_total[...])) by (decline_code)) for the decline code panel"
},
{
"name": "Business metric included",
"max_score": 9,
"description": "dashboard-notes.md or dashboard JSON includes at least one business metric panel (orders per minute OR revenue per hour) alongside the technical SLO panels"
}
]
}
Build a Commerce Observability Dashboard
Problem/Feature Description
An e-commerce company's SRE team recently inherited monitoring responsibilities for a headless storefront. Their Grafana instance is connected to a Prometheus data source that already scrapes metrics from the storefront — including checkout funnel counters (checkout_started_total, checkout_completed_total, checkout_abandoned_total), payment counters (payment_successes_total, payment_failures_total with a decline_code label), and an order creation latency histogram (order_creation_duration_ms_bucket). The team wants a single Grafana dashboard that gives both engineers and business stakeholders immediate visibility into commerce health.
The current situation: engineers waste 10–15 minutes during incidents piecing together whether a drop in orders is a technical failure or a business trend, because there is no unified view. Business stakeholders meanwhile have no real-time visibility and rely on daily sales reports. The SRE team needs a dashboard that surfaces both technical reliability signals and business KPIs in one place, making it immediately obvious whether an anomaly is a technical problem or a business event.
Output Specification
Produce a Grafana dashboard JSON file named commerce-dashboard.json that can be imported into a Grafana instance.
Also produce a dashboard-notes.md file that:
- Lists each panel in the dashboard with its panel type (e.g., gauge, time series, pie chart, stat)
- Documents the PromQL query used for each panel
The dashboard JSON should be valid Grafana dashboard format (version 6+). Panel visualization types matter — choose the appropriate visualization for each metric type.
{
"context": "Tests whether the agent correctly instruments a Node.js commerce storefront using the expected OpenTelemetry packages, SDK configuration, commerce-specific SLO values, metric naming conventions, histogram bucket boundaries, and attribute schemas for checkout funnel events.",
"type": "weighted_checklist",
"checklist": [
{
"name": "OTel SDK package",
"max_score": 5,
"description": "package.json or deps file includes @opentelemetry/sdk-node"
},
{
"name": "Auto-instrumentations package",
"max_score": 5,
"description": "package.json or deps file includes @opentelemetry/auto-instrumentations-node"
},
{
"name": "OTLP exporters packages",
"max_score": 5,
"description": "package.json or deps file includes both @opentelemetry/exporter-metrics-otlp-http AND @opentelemetry/exporter-trace-otlp-http"
},
{
"name": "prom-client included",
"max_score": 5,
"description": "package.json or deps file includes prom-client"
},
{
"name": "Instrumentation load order",
"max_score": 5,
"description": "INSTRUMENTATION_NOTES.md or code comments explicitly state that instrumentation.ts must be required/loaded before any other imports"
},
{
"name": "Service name value",
"max_score": 5,
"description": "NodeSDK is configured with serviceName: 'commerce-storefront'"
},
{
"name": "Metric export interval",
"max_score": 6,
"description": "PeriodicExportingMetricReader is configured with exportIntervalMillis: 15000"
},
{
"name": "HTTP/pg/ioredis instrumentations",
"max_score": 5,
"description": "All three auto-instrumentations are explicitly enabled: @opentelemetry/instrumentation-http, @opentelemetry/instrumentation-pg, @opentelemetry/instrumentation-ioredis"
},
{
"name": "Checkout SLO targets",
"max_score": 7,
"description": "COMMERCE_SLOS defines paymentSuccessRate with target: 0.95 and alert: 0.90, and checkoutCompletionRate with target: 0.75 and alert: 0.60"
},
{
"name": "Latency SLO values",
"max_score": 5,
"description": "COMMERCE_SLOS defines orderCreationLatencyP99 with target: 3000 and alert: 5000 (milliseconds)"
},
{
"name": "Meter name",
"max_score": 7,
"description": "Metrics are obtained via metrics.getMeter('commerce-checkout')"
},
{
"name": "Checkout counter names",
"max_score": 7,
"description": "Counter metric names are exactly: checkout.started, checkout.completed, checkout.abandoned"
},
{
"name": "Payment counter names",
"max_score": 7,
"description": "Counter metric names are exactly: payment.attempts, payment.successes, payment.failures"
},
{
"name": "Histogram name and boundaries",
"max_score": 8,
"description": "Histogram is named 'order.creation.duration_ms' with boundaries [100, 250, 500, 1000, 2000, 5000, 10000]"
},
{
"name": "Checkout start attribute",
"max_score": 5,
"description": "recordCheckoutStart (or equivalent) passes a 'channel' attribute to the checkout.started counter"
},
{
"name": "Checkout complete attributes",
"max_score": 5,
"description": "recordCheckoutComplete (or equivalent) passes both 'channel' and 'payment_method' attributes"
},
{
"name": "Payment failure attributes",
"max_score": 8,
"description": "recordPaymentFailure (or equivalent) passes both 'gateway' and 'decline_code' attributes"
}
]
}
Instrument a Node.js Storefront for Checkout Observability
Problem/Feature Description
A mid-sized fashion retailer recently experienced a 45-minute payment outage that went undetected until the customer support queue overflowed. The engineering team had server CPU and memory dashboards, but nothing that tracked whether checkouts were actually succeeding. After the incident, the CTO has asked the platform team to add proper observability to the Node.js/Next.js storefront before the next flash sale.
The team wants to track the full checkout funnel — from when a customer initiates checkout through payment capture to order creation — with enough granularity to know exactly where failures occur and how long each step takes. They also need the metrics to be available in their existing observability stack, which uses an OTLP-compatible collector.
Output Specification
Produce the following TypeScript source files that a developer could drop into a Next.js project:
1. lib/metrics/commerce-slos.ts — SLO definitions for the commerce stack 2. instrumentation.ts — OpenTelemetry SDK initialization (this file has specific loading requirements in Next.js) 3. lib/metrics/checkout-metrics.ts — Metric counters, histograms, and recording functions for the checkout funnel
Include a package.json (or a package-deps.txt) listing the required dependencies.
Write a brief INSTRUMENTATION_NOTES.md documenting any important setup instructions or ordering requirements for the instrumentation file.
{
"name": "finsi/monitoring-alerting-commerce",
"version": "0.1.0",
"summary": "Commerce-specific dashboards — checkout success rate, cart errors, payment failures",
"skills": {
"monitoring-alerting-commerce": {
"path": "SKILL.md"
}
}
}