tzurot-observability

Provides structured logging and health monitoring for Railway microservices using Pino and correlation IDs.

7|2|Updated May 17, 2025
One-click install
npx skills add https://github.com/lbds137/tzurot --skill tzurot-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tzurot-observability
Source: https://github.com/lbds137/tzurot/tree/main/.claude/skills/tzurot-observability
Command: npx skills add https://github.com/lbds137/tzurot --skill tzurot-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debugging microservices in production requires robust logging, metrics, and health checks to quickly identify and resolve issues. This Skill provides patterns for comprehensive observability, helping you understand system behavior and react swiftly to problems.

Core Features & Use Cases

  • Structured Logging with Pino: Implement fast, JSON-formatted logging for easy parsing, filtering, and analysis in tools like Railway logs.
  • Correlation IDs: Trace requests end-to-end across all microservices, providing a complete picture of complex interactions and pinpointing bottlenecks.
  • Error Tracking: Log errors with rich context, ensuring all necessary information (e.g., requestId, userId, err object) is captured for efficient debugging.
  • Health & Metrics Endpoints: Expose /health and /metrics endpoints for real-time service status, dependency checks, and performance monitoring.

Quick Start

Use the tzurot-observability skill to add structured logging with a correlation ID to a new function, ensuring sensitive data is not logged and errors are properly captured.

Frequently Asked Questions about tzurot-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up structured logging with correlation IDs in a microservice?

Structured logging with correlation IDs enables end-to-end request tracing across services. Implement Pino for JSON-formatted logs, attach a requestId to each request, and propagate it through all downstream calls. This allows you to filter and correlate logs by request, pinpointing failures and bottlenecks in production.

What's the best way to debug production issues across multiple services?

Cross-service debugging requires correlation IDs to link logs, metrics, and errors to a single request flow. Expose health and metrics endpoints to monitor service dependencies in real time. Use structured logging to capture rich context—userId, requestId, error objects—making it faster to diagnose where and why failures occur.

How do I ensure sensitive data isn't logged in production?

Apply privacy rules when structuring logs to exclude or redact sensitive fields like passwords, tokens, and PII. Use the golden logging pattern with explicit field selection rather than string interpolation, which makes it harder to accidentally log secrets. Document which fields are safe to log in your codebase.

Can I expose health and metrics endpoints for Railway deployments?

Yes, health and metrics endpoints work with Railway to expose real-time service status and dependency checks. Implement `/health` endpoints to report readiness and dependency health, and `/metrics` endpoints to track performance. Railway logs and CLI commands can then query these endpoints to diagnose and monitor service behavior.

What's the difference between logging and metrics for observability?

Logging captures detailed events and errors with full context for debugging specific incidents. Metrics aggregate counts, latencies, and health signals for trends and alerting. Together they provide both the granular detail to troubleshoot production issues and the aggregate view to detect systemic problems early.

Do I need a specific format for logs to work with Railway debugging tools?

JSON-formatted structured logs work best with Railway's log parsing and filtering. Pino outputs JSON by default, making logs queryable and filterable in Railway's CLI and dashboard. Avoid string interpolation; use explicit structured fields so Railway tools can reliably extract, search, and correlate logs.