golang-samber-slog

Configure Go structured logging with multi-handler composition, sampling, and attribute formatting.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/matdev83/go-llm-interactive-proxy --skill golang-samber-slog-matdev83
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-slog
Source: https://github.com/matdev83/go-llm-interactive-proxy/tree/main/.agents/skills/golang-samber-slog
Command: npx skills add https://github.com/matdev83/go-llm-interactive-proxy --skill golang-samber-slog-matdev83

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive tools for advanced structured logging in Go applications, enabling enhanced observability and debugging capabilities.

Core Features & Use Cases

  • Multi-handler composition: Combine multiple log outputs like JSON, text, or external services efficiently.
  • Sampling and filtering: Control log volume with threshold and rate-based sampling strategies.
  • PII and error formatting: Mask sensitive info and structure error data consistently.
  • Use Case: Developers can set up a robust logging pipeline in a Go microservice to ensure error visibility while reducing log noise and protecting user data.

Quick Start

Use the golang-samber-slog skill to configure a logging pipeline that samples 10% of logs, formats PII-sensitive attributes, and routes errors to Sentry.

Frequently Asked Questions about golang-samber-slog

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

FAQPage Schema
How do I set up structured logging in a Go microservice to reduce log noise?

Mask PII in structured logs by applying specific attribute formatting handlers that intercept and redact sensitive data fields before output. This approach ensures data privacy compliance by consistently structuring error data and masking sensitive information within the logging pipeline.

Can I route Go application errors to Sentry while using slog?

Yes, slog supports multi-handler composition, allowing you to combine JSON, text, and external service outputs efficiently. You can route errors to Sentry, sample 10% of standard logs, and format PII-sensitive attributes simultaneously within a single customizable pipeline.

What is multi-handler composition in Go structured logging?

Multi-handler composition is the process of combining multiple log outputs like JSON, text, or external services efficiently within a single pipeline. It enables developers to build customizable, high-performance log processing workflows that enhance observability and debugging capabilities.

When do I need sampling strategies for Go application logs?

You need sampling strategies for Go application logs when you must control log volume in high-throughput environments. Threshold and rate-based sampling allow you to capture representative log data and maintain error visibility without overwhelming your observability backend.