structured-logging-and-observability

Implement JSON structured logging, health endpoints, and metrics for production services.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/edwifiguy/era-agents-ops --skill structured-logging-and-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structured-logging-and-observability
Source: https://github.com/edwifiguy/era-agents-ops/tree/main/skills/era-agents-op/metaclaw/memory_data/skills/structured-logging-and-observability
Command: npx skills add https://github.com/edwifiguy/era-agents-ops --skill structured-logging-and-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Production services often lack reliable, structured visibility for debugging, auditing, and performance tuning; this skill provides a standard approach to structured logging, metrics, and health checks to improve observability.

Core Features & Use Cases

  • Structured logging in JSON for consistent parsing across services.
  • Defined log levels (DEBUG, INFO, WARNING, ERROR) to guide diagnostics.
  • Metrics exposure for request rate, error rate, latency (p50/p95/p99), and queue depth.
  • Health check endpoint at /health to support load balancer health monitoring.
  • Anti-pattern warning: avoid logging only on error to ensure observability.

Quick Start

Instrument your service with JSON logs, standard log levels, and a simple health endpoint to begin observable operations.

Frequently Asked Questions about structured-logging-and-observability

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

FAQPage Schema
What is structured logging and how does it improve production diagnostics?

Structured logging outputs logs in a consistent JSON format instead of plain text, making them easily parsable for production diagnostics. It enables reliable debugging and monitoring across microservices and data pipelines by standardizing log levels and metadata.

How do I implement observability and health checks for my microservices?

To implement observability and health checks for microservices, expose a /health endpoint for load balancer monitoring and emit actionable metrics like request rate, error rate, and latency. Combine this with JSON structured logs to ensure consistent visibility across services.

What metrics should I track for API observability and performance monitoring?

For API observability and performance monitoring, track request rate, error rate, latency percentiles (p50, p95, p99), and queue depth. These metrics provide actionable insights into service health and performance tuning alongside standard structured logs.

Why should I avoid logging only on errors for production systems?

Logging only on errors is an anti-pattern for production systems because it destroys observability during normal operations. You need consistent INFO and DEBUG logs alongside ERROR logs to establish baselines, trace execution flow, and accurately diagnose what led to the failure.

Can I use this structured logging approach for data pipelines and APIs?

Yes, this structured logging approach is applicable to data pipelines and APIs. It provides consistent JSON log formats, standard log levels, and reliable health checks across distributed services, ensuring observable operations and reliable debugging.

Does structured logging include safety guardrails to prevent sensitive data exposure?

Yes, structured logging includes safety guardrails to prevent sensitive data exposure. These guardrails ensure that while you gain reliable observability through JSON logs and metrics, you do not inadvertently leak protected information in your production diagnostics.