Implement comprehensive observability for Customer.io integrations including Prometheus metrics, structured logging, distributed tracing, and Grafana dashboards.
| Metric | Type | Description |
|---|---|---|
customerio_api_latency_ms |
Histogram | API call latency |
customerio_api_requests_total |
Counter | Total API requests |
customerio_api_errors_total |
Counter | API error count |
customerio_email_sent_total |
Counter | Emails sent |
customerio_email_bounced_total |
Counter | Email bounces |
customerio_webhook_received_total |
Counter | Webhooks received |
Register Prometheus counters and histograms for API latency, request counts, error counts, email delivery, and webhook events.
Wrap the Customer.io client to automatically record timing, success/error counters on every identify and track call.
Use pino for JSON structured logging with PII redaction. Log all Customer.io operations with operation type, user ID, result, and sanitized data.
Use OpenTelemetry spans for all Customer.io operations with proper status codes and exception recording.
Create panels for API latency percentiles (p50/p95/p99), request rate by operation, error rate percentage, and email delivery funnel.
Set up Prometheus alerts for high error rate (>5%), high p99 latency (>5s), high bounce rate (>5%), and webhook processing failures.
For detailed implementation code and configurations, load the reference guide:
Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)
| Issue | Solution |
|---|---|
| Missing metrics | Check metric registration |
| High cardinality | Reduce label values |
| Log volume too high | Adjust log level |
After observability setup, proceed to customerio-advanced-troubleshooting for debugging.
See monitoring implementation details for output format specifications.
Basic usage: Apply customerio observability to a standard project setup with default configuration options.
Advanced scenario: Customize customerio observability for production environments with multiple constraints and team-specific requirements.