What problem does it solve?
This Skill helps Go teams design reliable, consistent structured logging pipelines with samber/slog-* so logs are routed correctly, noisy records are sampled safely, and sensitive data is formatted or scrubbed before it reaches sinks.
Core Features & Use Cases
- Pipeline correctness for slog-multi: Compose sampling, middleware, routing, and sinks with the right ordering so expensive work is not performed for dropped records.
- Throughput control with slog-sampling: Apply uniform or threshold sampling to reduce volume while preserving early visibility and enabling matcher-based deduplication buckets.
- Safe attribute handling with slog-formatter and HTTP middleware sinks: Use PII and error/IP formatting so downstream backends (Sentry, Loki, Datadog, etc.) receive cleaned, structured attributes, including request-scoped attributes from HTTP middleware.
Quick Start
Use the golang-samber-slog skill to generate a slog-multi pipeline that applies sampling first, adds PII scrubbing with slog-formatter, routes ERROR to Sentry and the rest to Loki, and configures slog-gin to set WARN for 4xx and ERROR for 5xx.