linear-observability
Implement monitoring, logging, and alerting for Linear integrations. Use when setting up metrics collection, creating dashboards, or configuring alerts for Linear API usage. Trigger with phrases like "linear monitoring", "linear observability", "linear metrics", "linear logging", "monitor linear integration".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- linear-observability
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Implement monitoring, logging, and alerting for Linear integrations. Use when setting up metrics collection, creating dashboards, or configuring alerts for Linear API usage. Trigger with phrases like "linear monitoring", "linear observability", "linear metrics", "linear logging", "monitor linear integration".
- allowed-tools
- Read, Write, Edit, Grep
- compatible-with
- claude-code, codex, openclaw
02 资源文件 1
- 参考文档references/implementation.md6.6 KB
03 SKILL.md 正文
Linear Observability
Contents
Overview
Comprehensive monitoring, logging, and alerting for Linear integrations using Prometheus metrics, structured logging, and health checks.
Prerequisites
- Linear integration deployed
- Metrics infrastructure (Prometheus, Datadog, etc.)
- Logging infrastructure (ELK, CloudWatch, etc.)
- Alerting system configured
Instructions
Step 1: Define Key Metrics
| Metric | Type | Purpose |
|---|---|---|
linear_api_requests_total |
Counter | Track request volume by operation/status |
linear_api_request_duration_seconds |
Histogram | Measure API latency |
linear_rate_limit_remaining |
Gauge | Monitor rate limit headroom |
linear_webhooks_received_total |
Counter | Track webhook volume |
linear_cache_hits_total |
Counter | Measure cache effectiveness |
Step 2: Instrument the Client
Wrap the Linear SDK's fetch layer to capture metrics on every API call including operation name, duration, status, and rate limit headers.
Step 3: Add Structured Logging
Use pino/winston with JSON output, component tags, and correlation IDs for API calls, webhooks, and errors.
Step 4: Create Health Check Endpoint
Verify API connectivity, cache status, and rate limit headroom. Return healthy, degraded, or unhealthy status.
Step 5: Configure Alerting Rules
- High error rate (>5% over 5 min)
- Rate limit low (<100 remaining)
- Slow responses (p95 > 2s)
- Webhook processing errors
Step 6: Build Grafana Dashboard
Panels for request rate, latency p95, rate limit remaining, and webhook distribution.
See detailed implementation for full Prometheus metrics, instrumented client, logger, health check, alert rules, and Grafana dashboard JSON.
Output
- Prometheus metrics collecting on all Linear API calls
- Structured JSON logging for API calls and webhooks
- Health check endpoint returning system status
- Alerting rules for error rate, rate limits, and latency
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Metrics not collecting | Missing instrumentation | Wrap client with instrumented fetch |
| Alerts not firing | Wrong threshold | Adjust alert thresholds to match traffic |
| Missing labels | Logger misconfigured | Check logger base config and child loggers |
Examples
Quick Health Check
set -euo pipefail
curl http://localhost:3000/health/linear | jq # 3000: 3 seconds in ms
# { "status": "healthy", "checks": { "linear_api": { "status": "healthy", "latency_ms": 150 } } }
Resources
Next Steps
Create incident runbooks with linear-incident-runbook.
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.