qmetrics.net

zap

Structured leveled logging library for Go

Zap records structured, leveled log lines in Go programs with an emphasis on low allocation and CPU cost. It offers a strict Logger API and a looser SugaredLogger with printf-style helpers.

Overview

Zap is a logging package for Go that targets hot paths where encoding and formatting would otherwise dominate cost. It ships a reflection-free JSON encoder and a core Logger that avoids unnecessary serialization work and heap churn when fields are already attached.

The SugaredLogger sits on the same core and adds familiar loosely typed and sprintf-style calls when convenience matters more than squeezing allocations. Documentation contrasts when to pick each surface.

Compared with relying on the standard library's formatting and JSON packages for rich structs, the project argues that repeated reflection and small allocations add up in tight loops. Published benchmarks in the project compare Zap against other Go logging stacks on messages with many fields, reused context, and plain static strings.

Installation is via the Go module path go.uber.org/zap, with support limited to the two latest Go minor releases. The maintainers describe the 1.x API as stable for semver pinning.

Key features

  • Structured JSON log encoding
  • Leveled Logger and SugaredLogger
  • Reflection-free encoder path
  • Context fields with low overhead
  • Printf-style sugared helpers
  • Benchmarked against other loggers
  • Stable 1.x public API
  • Go module distribution

Use cases

  • High-throughput service logging
  • JSON logs for aggregators
  • Performance-sensitive microservices
  • Libraries needing typed log fields
  • Migrating off fmt-heavy logging

Tags

Similar software

Uptime Kuma

Self-hosted uptime monitoring with status pages and alerts

Uptime Kuma is a self-hosted monitoring tool for checking whether services stay online. It covers many probe types and can notify you through numerous messaging and email channels.

★ 95k⟳ yesterdayMIT
Open Source Alternative to:Pingdom

World Monitor

Real-time global intelligence dashboard for news and geopolitics

World Monitor combines live news, market data, and geopolitical signals on interactive world maps. Available on the web, as desktop builds, a terminal UI, CLI, SDKs, and an MCP server.

★ 91.3k⟳ todayAGPL-3.0
Open Source Alternative to:Liveuamap

Netdata

Per-second full-stack infrastructure observability platform

Netdata collects metrics, logs, and traces where they are generated, with per-second resolution, built-in dashboards, alerts, and machine learning anomaly detection on every metric.

★ 81.7k⟳ todayGPL-3.0
Open Source Alternative to:Application InsightsBetterStack+8

Grafana

Composable observability and data visualization platform

Grafana queries, visualizes, and alerts on metrics, logs, and traces from many backends. Teams build and share dashboards to explore operational data.

★ 78.2k⟳ todayAGPL-3.0
Open Source Alternative to:BetterStackNew Relic

Prometheus

Open-source metrics monitoring and time series database

Prometheus collects metrics from configured targets, evaluates rules, and can raise alerts. It stores time series data and exposes a query language called PromQL.

★ 67.9k⟳ yesterdayApache-2.0
Open Source Alternative to:PRTG Network Monitor

Sentry

Developer error tracking and performance monitoring

Sentry is a debugging platform for detecting, tracing, and fixing application issues. SDKs connect code to error, performance, replay, and related signals in one workflow.

★ 45.9k⟳ todaySource-available