notion-observability

Featured

Set up observability for Notion integrations with metrics, traces, and alerts. Use when implementing monitoring for Notion API calls, setting up dashboards, or configuring alerting for Notion integration health. Trigger with phrases like "notion monitoring", "notion metrics", "notion observability", "monitor notion", "notion alerts", "notion tracing".

AI & Automation 2,249 stars 312 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Notion Observability ## Overview Instrument Notion API calls with metrics, structured logging, and alerting. Track request rates, latencies, error rates, and rate limit headroom. This skill covers a full observability stack: an instrumented client wrapper, Prometheus metrics with histogram buckets tuned for Notion's typical 200-800ms latency, structured logging via pino, health check endpoints, and Prometheus alerting rules for error rate spikes, rate limit exhaustion, high latency, and service outages. ## Prerequisites - `@notionhq/client` v2+ installed (`npm install @notionhq/client`) - Python alternative: `notion-client` (`pip install notion-client`) - Prometheus-compatible metrics backend (optional: Grafana, Datadog, or CloudWatch) - Structured logging library: `pino` (Node.js) or `structlog` (Python) ## Instructions ### Step 1: Instrumented Notion Client Wrapper Wrap every Notion API call with timing, error classification, and structured logging: ```typescript import { Client, isNotionClientError, APIErrorCode } from '@notionhq/client'; interface NotionMetrics { requestCount: number; errorCount: number; rateLimitCount: number; totalLatencyMs: number; latencyBuckets: Map<string, number[]>; lastError: { code: string; message: string; timestamp: string } | null; } class InstrumentedNotionClient { private client: Client; private metrics: NotionMetrics = { requestCount: 0, errorCount: 0, rateLimitCount: 0, totalLatencyMs: 0, lat...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Related Skills