본문으로 건너뛰기
cccskills
무료GitHub에 공개

logging-setup

Structured logging: slog/pino, Cloud Logging, Loki, correlation IDs, PII scrubbing, sampling, cost control.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(4)

  • SKILL.md3.6 KB
  • references/anti-patterns.md394 B
  • references/checklist.md506 B
  • references/pii-audit-access.md1.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

logging-setup — Structured Logging

Objetivo: debuggable en prod, barato a escala, sin PII.

Principios

  1. JSON estructurado siempre — nunca strings libres en prod
  2. Una línea = un evento — no multi-line/pretty-print
  3. Level + message + context en todo evento
  4. Correlation ID (trace_id, request_id, user_id, tenant_id) en cada línea
  5. Sin PII — scrubber en el logger
  6. Sampling en hot paths
  7. Logs ≠ errors ≠ metrics ≠ traces — cada uno su destino

Stack Decision

DestinoCuándo
GCP Cloud LoggingDefault Educabot (runtime GCP), $0.50/GiB ingest
Grafana LokiSelf-host, alto volumen barato
Datadog LogsSi ya pagan DD APM
ELK/OpenSearchCompliance/SIEM full-text

Default: Cloud Logging (runtime) + Loki (alto volumen/cheap retention).

Setup por Stack

Go (slog stdlib 1.21+): slog.NewJSONHandler con level configurable, ReplaceAttr para PII scrubbing, base fields (service, env, version). Middleware Gin inyecta request-scoped attrs (request_id, trace_id, route) en context.

Node/TS (pino): level via env, base fields, redact.paths para PII (password, token, authorization, cookie, dni, cuit), pinoHttp middleware con custom props (trace_id) y serializers compactos. Pino > winston: 5x más rápido, JSON nativo.

Cloud Logging fields: severity (DEBUG-CRITICAL), logging.googleapis.com/trace (auto-link a Cloud Trace), httpRequest (método/status/latency como columnas). Cloud Run/GKE: stdout se loguea automáticamente.

React/frontend: errores → Sentry, analytics → Mixpanel/Amplitude. Si necesitás logs centralizados: buffer + batch + flush a /api/logs, solo warn+ en prod. Evitar loguear interacciones rutinarias.

React Native: errores → Sentry, analytics → Mixpanel. Debug en campo: react-native-logs (archivos rotados), upload con consent. Nunca PII en logs del device.

Correlation / Trace IDs

OTel W3C Trace Context (traceparent). Todo log en un request con mismo trace_id. Go: trace.SpanFromContext(ctx).SpanContext().TraceID().

Log Levels

LevelUso
DEBUGFlujo interno. Off en prod salvo troubleshooting
INFOEventos normales. Default prod
WARNRecuperable ("retry 2/3"). Mirar tendencias
ERRORFalla operación, sistema sigue. → Sentry también
FATALSe muere el servicio. Raro. Page on-call

Si nadie va a hacer algo con la línea → bájala de level o sacala.

Sampling

Cloud Logging ~$0.50/GiB. Estrategia: siempre errores 100%, samplear éxitos (5-10%). Con OTel tracing, bajar INFO a 1-5%.

→ Read references/pii-audit-access.md for PII scrubbing fields, audit log schema, access log fields, and retention/cost tables

→ Read references/anti-patterns.md for common logging anti-patterns

→ Read references/checklist.md for the 12-item implementation checklist

Checklist

  • Log destination chosen and configured (Cloud Logging, Loki, Datadog, or ELK)
  • Correlation IDs (trace_id, request_id) injected in every log line via middleware
  • PII scrubbing in place (password, token, authorization, cookie, dni, cuit redacted)
  • Sampling strategy defined (errors 100%, success paths 5-10%)
  • Log levels set correctly per environment (DEBUG off in prod, INFO as default)
  • JSON structured format enforced — no free-form strings in production

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고