cloudflare-workers-observability

Solid

Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors.

DevOps & Infrastructure 168 stars 27 forks Updated 4 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

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

Skill Content

# Cloudflare Workers Observability Production-grade observability for Cloudflare Workers: logging, metrics, tracing, and alerting. ## Quick Start ```typescript // Structured logging with context export default { async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> { const requestId = crypto.randomUUID(); const logger = createLogger(requestId, env); try { logger.info('Request received', { method: request.method, url: request.url }); const result = await handleRequest(request, env); logger.info('Request completed', { status: result.status }); return result; } catch (error) { logger.error('Request failed', { error: error.message, stack: error.stack }); throw error; } } }; // Simple logger factory function createLogger(requestId: string, env: Env) { return { info: (msg: string, data?: object) => console.log(JSON.stringify({ level: 'info', requestId, msg, ...data, timestamp: Date.now() })), error: (msg: string, data?: object) => console.error(JSON.stringify({ level: 'error', requestId, msg, ...data, timestamp: Date.now() })), warn: (msg: string, data?: object) => console.warn(JSON.stringify({ level: 'warn', requestId, msg, ...data, timestamp: Date.now() })), }; } ``` ## Critical Rules 1. **Always use structured JSON logging** - Plain text logs are hard to parse and aggregate 2. **Include request context** - Request ID, method, path in every log entry 3. **Never log sen...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
7 months ago
Last Updated
4 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category