Zap

No Change
trial
First Added:December 8, 2025 Updated: July 29, 2026

Zap is Uber’s structured, leveled logging library for GoLang. We trial it when a service needs low-allocation JSON logs; not to be confused with OWASP Zed Attack Proxy (Zap).

Blurb

Blazing fast, structured, leveled logging in Go.

Summary

What it is: Strongly typed fields (zap.String, zap.Int, …) instead of printf-style formatting. Production configs favor JSON; development often uses console encoding.

When to use:

SituationNotes
Existing Zap estateStay consistent with Uber-style instrumentation
Benchmark-sensitive servicesLow allocation vs heavier facades
Team standard already ZapConfig via zap.Config or zap.NewProduction()

When to skip:

  • Greenfield modern Go: prototype with stdlib log/slog first
  • Mixing multiple logging facades in one binary
  • Need only trivial stderr prints

Trade-offs: Mature and fast. Another dependency and API to learn versus slog. Prefer one facade per service.

Details

TopicNotes
CategoryCode / Library (imported, not a standalone agent)
OpsJSON lines into Loki, ELK, or CloudWatch; set level and sampling per env
DisambiguationOWASP Zed Attack Proxy (Zap) is unrelated DAST tooling

References