go-samber-slog

Build structured logging pipelines for Go applications using samber/slog extensions.

Updated May 2, 2026
One-click install
npx skills add https://github.com/Qunnnn/agents --skill go-samber-slog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-samber-slog
Source: https://github.com/Qunnnn/agents/tree/main/skills/go/go-samber-slog
Command: npx skills add https://github.com/Qunnnn/agents --skill go-samber-slog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Go developers design efficient, secure structured logging systems with composable handlers, reducing logging noise, protecting sensitive data, and improving observability.

Core Features & Use Cases

  • Handler Composition: Build advanced log pipelines with routing, fan-out, and multi-sink output strategies.
  • Log Optimization: Apply sampling and formatting techniques to reduce overhead and sanitize attributes before delivery.
  • Use Case: Configure a production Go service to route errors to monitoring platforms while keeping general application logs in JSON output with PII protection.

Quick Start

Use the go-samber-slog skill to design a structured logging pipeline for my Go application with sampling, formatting, and multiple output handlers.

Frequently Asked Questions about go-samber-slog

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

FAQPage Schema
How do I build a structured logging pipeline in Go with routing and multiple output handlers?

To build a structured logging pipeline in Go, you can configure composable handlers for log routing, fan-out, and multi-sink output strategies. This approach enables sending logs to different destinations simultaneously, such as routing errors to monitoring platforms while keeping general application logs in JSON output.

How does PII protection work in Go structured logging when sanitizing attributes?

PII protection in Go structured logging works by applying safe attribute transformation to sanitize sensitive data before delivery. By configuring composable handlers, you intercept and redact personally identifiable information from log entries, ensuring compliance while maintaining useful observability data for backend services.

What is the best way to reduce logging overhead in Go backend services?

The best way to reduce logging overhead in Go backend services is by applying sampling and formatting techniques within your structured logging pipeline. Composable handler configurations allow you to drop or sample less critical logs, reducing noise and processing overhead while retaining essential observability data.

Can I use slog extensions to route errors to monitoring platforms in Go applications?

Yes, you can use slog extensions to route errors to monitoring platforms in Go applications. By setting up advanced log pipelines with fan-out strategies, the system directs error-level logs to observability integrations while simultaneously sending general application logs to standard JSON output sinks.

Does setting up Go structured logging with composable handlers require external dependencies?

Setting up Go structured logging with composable handlers relies on the samber/slog extension library for its implementation. While the skill itself has no formal dependencies listed, integrating it into your backend service requires importing the samber/slog package to access its handler composition and sink management features.

Why does log fan-out cause noise in production Go services and how do I limit it?

Log fan-out causes noise in production Go services when multiple sinks receive unfiltered high-volume log streams. You can limit this by applying efficient sink management and sampling techniques within your composable handler configuration, ensuring only necessary logs reach specific observability integrations and reducing overall overhead.