| name | linear-observability |
| description | Implement monitoring, logging, and alerting for Linear integrations.
Use when setting up metrics collection, dashboards,
or configuring alerts for Linear API usage.
Trigger: "linear monitoring", "linear observability",
"linear metrics", "linear logging", "monitor linear",
"linear Prometheus", "linear Grafana".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linear","api","monitoring","observability"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Linear Observability
Overview
Production monitoring for Linear integrations using Prometheus metrics, structured logging with pino, health checks, and alerting rules. Track API latency, error rates, rate limit headroom, and webhook throughput.
Prerequisites
- Linear integration deployed
- Prometheus or Datadog for metrics
- Structured logging (pino, winston)
- Alerting system (PagerDuty, OpsGenie, Slack)
Instructions
Step 1: Define Metrics
import { Counter, Histogram, Gauge, register } from "prom-client";
export const metrics = {
apiRequests: new Counter({
name: "linear_api_requests_total",
help: "Total Linear API requests",
labelNames: ["operation", "status"],
}),
apiLatency: new Histogram({
name: "linear_api_request_duration_seconds",
help: "Linear API request duration",
labelNames: ["operation"],
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
}),
rateLimitRemaining: new ({
: ,
: ,
: [],
}),
: ({
: ,
: ,
: [, ],
}),
: ({
: ,
: ,
: [],
: [, , , , , ],
}),
: ({
: ,
: ,
: [],
}),
: ({
: ,
: ,
: [],
}),
};
app.(, (req, res) => {
res.(, register.);
res.( register.());
});