logger-design

Implement structured JSON logging and distributed tracing across Node.js, Python, Go, and frontend services.

1|2|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/parisgroup-ai/imersao-ia-setup --skill logger-design-parisgroup-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logger-design
Source: https://github.com/parisgroup-ai/imersao-ia-setup/tree/main/skills/logger-design
Command: npx skills add https://github.com/parisgroup-ai/imersao-ia-setup --skill logger-design-parisgroup-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consistent, production-ready approach to structured logging and distributed tracing so teams can reliably trace requests, detect errors, and prevent sensitive data leakage across services.

Core Features & Use Cases

  • Enforces a rigid JSON log schema with mandatory fields (timestamp, level, service, environment, traceId, spanId) to make logs machine-readable and searchable.
  • Distributed tracing patterns and header propagation (W3C traceparent plus custom headers) for end-to-end request correlation across Node.js, Python, Go, and browser clients.
  • PII sanitization, environment-aware log levels, and middleware examples to avoid leaking sensitive data and to meet retention/compliance needs.
  • Use cases: instrumenting HTTP request pipelines, aggregating service traces for root-cause analysis, and safely exporting logs to ELK/Loki/CloudWatch while respecting retention and masking rules.

Quick Start

Add the logger to your service, ensure trace headers are propagated, and run one request to verify logs include traceId and no raw PII.

Frequently Asked Questions about logger-design

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

FAQPage Schema
How do I implement structured logging and distributed tracing across multiple services?

Implement structured logging and distributed tracing by enforcing a rigid JSON log schema with traceId and spanId propagation. This ensures end-to-end request correlation across multi-stack applications, making logs machine-readable and searchable for root-cause analysis.

Does this logging design work with Node.js, Python, Go, and frontend clients?

Yes, this logging design applies to multi-stack applications including Node.js, Python, Go, and browser clients. It provides distributed tracing patterns and header propagation to ensure end-to-end HTTP request correlation across these diverse environments.

What is the best way to sanitize PII from application logs for compliance?

The best way to sanitize PII from application logs is to apply built-in PII sanitization functions alongside environment-aware log levels. This prevents sensitive data leakage, meeting retention and compliance needs when exporting to platforms like ELK, Loki, or CloudWatch.

How do OpenTelemetry-compatible integrations handle traceId and spanId propagation?

OpenTelemetry-compatible integrations handle traceId and spanId propagation using W3C traceparent and custom header formats. This mechanism ensures consistent traceability and HTTP request tracing across services, preventing broken trace contexts in distributed systems.

Can I use environment-aware log levels to control log output in different deployments?

Yes, you can use environment-aware log levels to control log output across different deployment stages. This feature adjusts verbosity dynamically, ensuring detailed logs during development while minimizing noise and retaining only critical errors in production.

Why does my distributed tracing break when passing requests between services?

Distributed tracing breaks when services fail to propagate W3C traceparent or custom trace headers. Enforcing a rigid JSON log schema with mandatory traceId and spanId fields ensures that HTTP request pipelines maintain continuous trace context across service boundaries.