observability

Enforce JSON logging, traceId propagation, health endpoints, and Prometheus metrics for Node.js microservices.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/hendrax5/ironman --skill observability-hendrax5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability
Source: https://github.com/hendrax5/ironman/tree/main/skills/observability
Command: npx skills add https://github.com/hendrax5/ironman --skill observability-hendrax5

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent logging, missing trace propagation, unreliable health checks, and fragmented metrics make incident detection, debugging, and alerting slow and error-prone. This Skill defines a single, enforceable observability standard to make telemetry reliable and searchable across services.

Core Features & Use Cases

  • Structured logging: Mandatory JSON logs with required fields such as timestamp (ISO8601 with ms), level, traceId, module, action, and message to enable centralized parsing and querying.
  • Tracing: Enforced traceId propagation via x-trace-id with guidance for storing trace context (AsyncLocalStorage) so all logs within a request share the same trace identifier.
  • Health checks: Prescribed /health/live and /health/ready endpoints with rules for dependency checks and response shapes to support load balancers and readiness gating.
  • Metrics: Prometheus-ready metrics list including http_requests_total, http_request_duration_seconds, db_query_duration_seconds, active_connections, and error_total for SLOs and alerting.

Quick Start

Apply the observability standard to the service user-service to enforce JSON structured logs with required fields, propagate traceId via x-trace-id, expose /health/live and /health/ready, and export Prometheus metrics.

Frequently Asked Questions about observability

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

FAQPage Schema
How do I implement structured logging and traceId propagation for Node.js microservices?

Structured logging and traceId propagation are implemented by enforcing JSON log schemas with required fields like ISO8601 timestamps and passing the traceId via the x-trace-id header across microservices. Storing trace context in AsyncLocalStorage ensures all logs within a request share the same identifier.

What is the difference between /health/live and /health/ready endpoints for load balancer readiness?

The /health/live and /health/ready endpoints serve distinct readiness purposes: /health/live checks if the application process is running, while /health/ready verifies dependency checks to gate load balancer traffic based on true service availability.

How do I expose Prometheus metrics for HTTP requests and database queries in a distributed environment?

Prometheus metrics for distributed environments are exposed by defining and instrumenting counters and histograms like http_requests_total, http_request_duration_seconds, and db_query_duration_seconds to support SLOs and alerting.

Can I use this observability standard with backend services not written in Node.js?

While the standard is designed for Node.js and similar backend services, the observability principles apply universally. Any distributed environment can enforce JSON structured logs, x-trace-id propagation, health endpoints, and Prometheus metrics.

What fields are required in a JSON structured log schema for centralized observability parsing?

Required fields in a JSON structured log schema for centralized parsing include timestamp (ISO8601 with milliseconds), level, traceId, module, action, and message to enable reliable querying across observability pipelines.

Why does inconsistent logging make incident detection slow in distributed microservices?

Inconsistent logging makes incident detection slow because missing trace propagation and fragmented metrics prevent reliable correlation across services, making debugging and alerting error-prone without a single enforceable observability standard.