Skip to main content
Version: 2.x

Introduction to Observability in ZIO

Observability is the ability to understand what a running application is doing from the outside. In a highly concurrent application, where many fibers run at once and services are spread across several servers, we need information emitted by the application itself to find out about errors, response latency, and where a request spends its time. ZIO provides the building blocks for this in its core library, and connects to external tools for the rest.

Pages in This Sectionโ€‹

The section has four parts:

  • Logging โ€” A lightweight built-in logging facade that standardizes the interface to logging functionality. It covers ZIO.log, log levels, log spans, and log annotations, and it can be plugged into an existing logging backend. The ZLogger page documents the composable functional logging interface behind it.
  • Metrics โ€” Counter, gauge, histogram, summary, and frequency metrics, defined as ZIO aspects that can be applied to an effect without changing its signature. The section also covers metric labels and JVM metrics.
  • Tracing โ€” How to follow the lifetime of a request across several services in a distributed system, supported through the OpenTelemetry API in ZIO Telemetry.
  • Supervisor โ€” Supervisor[A], which supervises the launching and termination of fibers and produces a visible value of type A, for example to report the number of running fibers.

Where to Go Nextโ€‹

  • ZIO Logging โ€” Logging backends that the built-in logging facade can be plugged into.
  • ZIO Telemetry โ€” Tracing through the OpenTelemetry API.
  • Fiber โ€” The lightweight threads of execution that a Supervisor observes.

ZIO Chat

๐Ÿ”ฅ Ignite your ZIO journey with ZIO Chat! ๐Ÿ”ฅ Ready to unravel the intricacies of ZIO? As your trusty sidekick, I'm here to light the way. No matter if you're wandering through functional forests or traversing effectful landscapes, I've got answers to keep you on track. Your ZIO adventure starts here โ€“ ask me anything and let's explore together!