# ZIO > Type-safe, composable asynchronous and concurrent programming for Scala. This file contains links to documentation sections following the llmstxt.org standard. ## Table of Contents - [Basic Concurrency](https://zio.dev/overview/basic-concurrency.md): Introduction to ZIO's fiber-based concurrency model with operators for forking, joining, parallelism, racing, and resource-safe timeouts. - [Basic Operations](https://zio.dev/overview/basic-operations.md): Guide to transforming and combining ZIO effects using mapping, chaining, for-comprehensions, and zipping operations. - [Creating Effects](https://zio.dev/overview/creating-effects.md): Comprehensive guide to creating ZIO effects from values, Scala data types, and converting synchronous or asynchronous code. - [Handling Errors](https://zio.dev/overview/handling-errors.md): Error handling tools for catching, recovering, and retrying ZIO effects with safe fallback strategies and robust error management. - [Handling Resources](https://zio.dev/overview/handling-resources.md): Learn how to manage resources safely in ZIO with Scope, acquire-release patterns, and ensure no resource leaks even under failure or interruption. - [Getting Started with ZIO](https://zio.dev/zio-aws/getting-started.md): Get started with ZIO, a powerful functional effect system for Scala that enables asynchronous, concurrent, and parallel programming. - [Modules](https://zio.dev/overview/modules.md): An overview of all published ZIO artifacts (zio, zio-streams, zio-test, and more) and when to add each one to your build. - [Performance](https://zio.dev/overview/performance.md): Optimize your ZIO applications for maximum throughput and minimal latency with batching, caching, and streaming techniques. - [Platforms](https://zio.dev/overview/platforms.md): Configure ZIO for different platforms including JVM, JavaScript, and Native with platform-specific services and runtimes. - [Running Effects](https://zio.dev/overview/running-effects.md): Guide to executing ZIO effects using ZIOAppDefault, Runtime, and custom environments with error logging integration. - [Summary](https://zio.dev/overview/summary.md): ZIO is a next-generation framework for building cloud-native applications on the JVM. With a beginner-friendly yet powerful functional core, ZIO le... - [Architectural Patterns](https://zio.dev/reference/architecture/architectural-patterns.md): In this section, we are going to talk about the design elements of a ZIO application and the ZIO idiomatic way of structuring codes to write ZIO ap... - [Functional Design Patterns](https://zio.dev/reference/architecture/functional-design-patterns.md): When designing an API, there are patterns that are commonly used. In this section, we are going to talk about some of these patterns: - [Non-functional Requirements](https://zio.dev/reference/architecture/non-functional-requirements.md): Designing and architecting a software system is a complex task. We should consider both the functional and non-functional requirements of the system. - [Programming Paradigms in ZIO](https://zio.dev/reference/architecture/programming-paradigms-in-zio.md): It is important to realize that the programming paradigm used to write a software system has a significant impact on its design and architecture. I... - [Hub](https://zio.dev/reference/concurrency/hub.md): A `Hub` is an asynchronous message hub. Publishers can publish messages to the hub and subscribers can subscribe to receive messagesfrom the hub. - [Introduction to Concurrent Programming in ZIO](https://zio.dev/reference/index.md): Lock-free, composable, non-blocking concurrency model in ZIO for safe multi-fiber coordination using atomic primitives like Ref and Promise. - [Promise](https://zio.dev/reference/concurrency/promise.md): A purely functional synchronization primitive that enables fiber coordination through a single value set exactly once. - [Queue](https://zio.dev/reference/concurrency/queue.md): Lightweight, fully asynchronous in-memory queue with composable back-pressure for fiber coordination. - [Ref](https://zio.dev/reference/concurrency/ref.md): Thread-safe atomic reference for managing immutable state in concurrent ZIO applications. - [Ref.Synchronized](https://zio.dev/reference/concurrency/refsynchronized.md): Mutable reference supporting atomic and effectful updates for managing shared state concurrently. - [Semaphore](https://zio.dev/reference/concurrency/semaphore.md): A synchronization primitive that safely manages permit-based fiber coordination with automatic release guarantees. - [Introduction to Configuration in ZIO](https://zio.dev/reference/index-2.md): Guide to ZIO's unified configuration system: describe configs declaratively and load them via ConfigProvider. - [Automatic ZLayer Derivation](https://zio.dev/reference/contextual/automatic-zlayer-derivation.md): ZIO's `ZLayer` is a powerful tool for building modular, testable, and composable applications. With the `ZLayer.derive` - [Introduction to the ZIO's Contextual Data Types](https://zio.dev/reference/index-3.md): ZIO's contextual abstraction for encoding environments that effects require, enabling dependency injection and service composition through type-saf... - [Layer](https://zio.dev/reference/contextual/layer.md): `Layer[+E, +ROut]` is a type alias for `ZLayer[Any, E, ROut]`, which represents a layer that doesn't require any services, it may fail with an erro... - [RLayer](https://zio.dev/reference/contextual/rlayer.md): `RLayer[-RIn, +ROut]` is a type alias for `ZLayer[RIn, Throwable, ROut]`, which represents a layer that requires `RIn` as its input, it may fail wi... - [TaskLayer](https://zio.dev/reference/contextual/tasklayer.md): `TaskLayer[+ROut]` is a type alias for `ZLayer[Any, Throwable, ROut]`, which represents a layer that doesn't require any services as its input, it ... - [ULayer](https://zio.dev/reference/contextual/ulayer.md): `ULayer[+ROut]` is a type alias for `ZLayer[Any, Nothing, ROut]`, which represents a layer that doesn't require any services as its input, it can't... - [URLayer](https://zio.dev/reference/contextual/urlayer.md): `URLayer[-RIn, +ROut]` is a type alias for `ZLayer[RIn, Nothing, ROut]`, which represents a layer that requires `RIn` as its input, it can't fail, ... - [ZEnvironment](https://zio.dev/reference/contextual/zenvironment.md): Understand ZEnvironment, the type-level map that maintains and manages environmental services and implementations for ZIO effects. - [ZIO Environment Use-cases](https://zio.dev/reference/contextual/zio-environment-use-cases.md): Explore practical ZIO environment use cases for local capabilities and business logic dependencies with service organization patterns. - [ZLayer](https://zio.dev/reference/contextual/zlayer.md): ZLayer provides composable recipes for constructing services with type-safe dependency management and asynchronous resource handling. - [Introduction to ZIO's Control Flow Operators](https://zio.dev/reference/index-4.md): Control-flow operators in ZIO: conditional branching (when, unless, cond), looping (loop, iterate, foreach), and resource bracketing. - [Cause](https://zio.dev/reference/core/cause.md): Cause[E] losslessly encodes the full story of a fiber failure, including expected errors, defects, interruptions, and their sequential or parallel ... - [Exit](https://zio.dev/reference/core/exit.md): Exit type represents ZIO fiber outcomes as either Success with a value or Failure with a typed error Cause. - [Core Data Types](https://zio.dev/reference/index-5.md): Foundational data types for ZIO applications including effect values, type aliases, runtime execution, exit values, and failure causes. - [Runtime](https://zio.dev/reference/core/runtime.md): Runtime[R] executes ZIO effects within an environment R, bundling a thread pool, environment, and runtime configuration. - [IO](https://zio.dev/reference/core/zio/io.md): Type alias for ZIO[Any, E, A] representing an effect with no environment requirements that may fail with an E or succeed with a value A. - [RIO](https://zio.dev/reference/core/zio/rio.md): Type alias for ZIO[R, Throwable, A] representing an effect requiring environment R that may fail with a Throwable or succeed with value A. - [Task](https://zio.dev/reference/core/zio/task.md): Type alias for ZIO[Any, Throwable, A] representing an effect with no environment requirements that may fail with a Throwable or succeed with a value. - [UIO](https://zio.dev/reference/core/zio/uio.md): Type alias for ZIO[Any, Nothing, A] representing an infallible effect that requires no environment and cannot fail, always succeeding with a value. - [URIO](https://zio.dev/reference/core/zio/urio.md): Type alias for ZIO[R, Nothing, A] representing an effect requiring environment R that cannot fail but succeeds with value A. - [ZIO](https://zio.dev/reference/core/zio.md): Immutable lazy value that describes workflows with fiber-based concurrency and typed error and success values. - [ZIOApp](https://zio.dev/reference/core/zioapp.md): Entry point trait for ZIO applications supporting custom environments, composable layers, and graceful shutdown handling. - [Automatic Layer Construction](https://zio.dev/reference/di/automatic-layer-construction.md): ZIO also has an automatic layer construction facility, which takes care of building dependency graphs from the individual layers and building block... - [Building Dependency Graph](https://zio.dev/reference/di/building-dependency-graph.md): Build dependency graphs in ZIO using manual layer composition or automatic dependency injection with compile-time validation. - [Getting Started With Dependency Injection in ZIO](https://zio.dev/reference/di/dependency-injection-in-zio.md): Master ZIO dependency injection: access services from environment, compose applications, build dependency graphs with ZLayer, and inject dependencies. - [Layers Are Shared by Default](https://zio.dev/reference/di/dependency-memoization.md): Layer memoization allows a layer to be created once and used multiple times in the dependency graph. So if we use the same layer twice, e.g. `(a >>... - [Dependency Propagation](https://zio.dev/reference/di/dependency-propagation.md): When we write an application, our application has a lot of dependencies. We need a way to provide implementations and to feed and propagate all dep... - [Examples](https://zio.dev/reference/di/examples.md): In the following example, we have an application that requires `AppConfig` layer, which itself requires `DBConfig` and `ServerConfig` layers: - [Introduction to Dependency Injection in ZIO](https://zio.dev/reference/index-6.md): Explore ZIO's built-in dependency injection system using ZIO Environment and ZLayer for type-safe, composable service management. - [Manual Layer Construction](https://zio.dev/reference/di/manual-layer-construction.md): Master manual ZLayer composition: horizontally combine layers, vertically feed outputs, manage hidden dependencies, and prevent cycles. - [Motivation](https://zio.dev/reference/di/motivation.md): :::caution - [Overriding Dependency Graph](https://zio.dev/reference/di/overriding-dependency-graph.md): Overview of overriding ZIO dependency graphs using global and local environments for flexible dependency injection. - [Providing Different Implementation of a Service](https://zio.dev/reference/di/providing-different-implementation-of-a-service.md): Provide multiple service implementations to ZIO applications without modifying core logic using dependency injection. - [ZLayer: Constructor as a Value](https://zio.dev/reference/di/zlayer-constructor-as-a-value.md): Before jumping into the next section, which will explain dependency injection in ZIO, let's take a look at the philosophy behind the `ZLayer` data ... - [Model Domain Errors Using Algebraic Data Types](https://zio.dev/reference/error-management/best-practices/algebraic-data-types.md): Model domain errors using sealed traits and case classes (ADTs) for exhaustive compiler-checked error handling in ZIO applications. - [Don't Type Unexpected Errors](https://zio.dev/reference/error-management/best-practices/unexpected-errors.md): Learn why unexpected errors should not be typed, and use orDie and refineOrDie to separate recoverable errors from application-killing defects. - [Best Practices](https://zio.dev/reference/error-management/index.md): Recommended patterns for ZIO's typed error channel: model domain errors as ADTs, use union types for precision, keep defects untyped, and avoid ref... - [Don't Reflexively Log Errors](https://zio.dev/reference/error-management/best-practices/logging-errors.md): Avoid reflexively logging errors by leveraging ZIO's typed errors for guaranteed error propagation across your application. - [Use Union Types to Be More Specific About Error Types](https://zio.dev/reference/error-management/best-practices/union-types.md): Use Scala 3 union types to compose unrelated error types without a shared supertype, giving precise error signatures in ZIO effects. - [Imperative vs. Declarative Error Handling](https://zio.dev/reference/error-management/imperative-vs-declarative.md): Compare imperative exception-based error handling with ZIO's declarative typed-error approach and learn why referential transparency matters for er... - [Error Accumulation](https://zio.dev/reference/error-management/error-accumulation.md): Collect all errors from a set of effects instead of short-circuiting on the first failure, using ZIO.validate, ZIO.validatePar, ZIO.validateFirst, ... - [Examples](https://zio.dev/reference/error-management/examples.md): End-to-end ZIO error management examples illustrating typed failures, defects, and the distinction between expected and unexpected errors in a prac... - [Exceptional and Unexceptional Effects](https://zio.dev/reference/error-management/exceptional-and-unexceptional-effects.md): Exceptional effects (Task, RIO) use Throwable; unexceptional effects (UIO, URIO) use Nothing, giving compile-time guarantees against failure. - [Expected and Unexpected Errors](https://zio.dev/reference/error-management/expected-and-unexpected-errors.md): Distinguish between expected recoverable errors and unexpected defects, and learn how ZIO's type system reflects expected errors while sandboxing u... - [Introduction to Error Management in ZIO](https://zio.dev/reference/index-7.md): ZIO's comprehensive approach to handling typed errors with facilities for catching, propagating, and transforming errors type-safely. - [Chaining Effects Based on Errors](https://zio.dev/reference/error-management/operations/chaining-effects-based-on-errors.md): Chain ZIO effects based on error values using flatMapError, which sequences a second effect dependent on the first effect's typed error. - [Converting Defects to Failures](https://zio.dev/reference/error-management/operations/converting-defects-to-failures.md): Convert ZIO defects back to typed failures using absorb and resurrect operators to recover from unexpected errors in your error handling flow. - [Error Refinement](https://zio.dev/reference/error-management/operations/error-refinement.md): Narrow or widen ZIO's typed error channel using refineOrDie, refineToOrDie, unrefine, unrefineTo, and unrefineWith to separate recoverable errors f... - [Exposing Errors in The Success Channel](https://zio.dev/reference/error-management/operations/exposing-errors-in-the-success-channel.md): Move typed failures into the success channel as Either values using ZIO#either, and submerge them back with ZIO#absolve or ZIO.absolve. - [Exposing the Cause in The Success Channel](https://zio.dev/reference/error-management/operations/exposing-the-cause-in-the-success-channel.md): Expose the full Cause[E] graph in the success channel using ZIO#cause, then submerge it back with ZIO#uncause for structured cause inspection. - [Filtering the Success Channel](https://zio.dev/reference/error-management/operations/filtering-the-success-channel.md): Filter ZIO success values against a predicate using filterOrFail, filterOrDie, filterOrElse, and filterOrElseWith to handle values that don't meet ... - [Flattening Optional Error Types](https://zio.dev/reference/error-management/operations/flattening-optional-error-types.md): Flatten Option[E] error types into plain E using ZIO#flattenErrorOption, providing a default error value for the None case. - [Flipping Error and Success Channels](https://zio.dev/reference/error-management/operations/flipping-error-and-success-channels.md): Swap a ZIO effect's error and success channels using flip and flipWith to apply success-channel operators to errors or vice versa. - [Error Channel Operations](https://zio.dev/reference/error-management/index-2.md): Transform ZIO's error channel without recovering: map errors, chain on failures, filter successes, expose errors and causes in the success channel,... - [Map Operations](https://zio.dev/reference/error-management/operations/map-operations.md): Transform ZIO error values with mapError, mapErrorCause, and mapAttempt — operators that change the shape of the error channel without recovering f... - [Merging the Error Channel into the Success Channel](https://zio.dev/reference/error-management/operations/merging-the-error-channel-into-the-success-channel.md): Use ZIO#merge to collapse the error channel into the success channel when the error and success types are compatible, producing an infallible effect. - [Rejecting Some Success Values](https://zio.dev/reference/error-management/operations/rejecting-some-success-values.md): Convert select success values into typed failures using ZIO#reject and ZIO#rejectZIO with a partial function, turning unwanted successes into errors. - [Tapping Errors](https://zio.dev/reference/error-management/operations/tapping-errors.md): Inspect ZIO failure values, defects, and Cause graphs as a side effect without altering the error channel, using tapError, tapErrorCause, tapDefect... - [Zooming In on Nested Values](https://zio.dev/reference/error-management/operations/zooming-in-on-nested-values.md): Navigate into Option and Either values nested in ZIO effects using some, unsome, left, unleft, right, and unright operators. - [Catching](https://zio.dev/reference/error-management/recovering/catching.md): Recover from typed failures, defects, interruptions, and full Cause graphs using ZIO's catching operators: catchAll, catchSome, catchAllCause, catc... - [Fallback](https://zio.dev/reference/error-management/recovering/fallback.md): Provide alternative effects or values when a ZIO effect fails using orElse, orElseFail, orElseSucceed, and related fallback combinators. - [Folding](https://zio.dev/reference/error-management/recovering/folding.md): Fold over ZIO effects to handle both success and failure in one step using fold, foldZIO, foldCause, and foldCauseZIO — the primitive all ZIO error... - [Recovering From Errors](https://zio.dev/reference/error-management/index-3.md): Recover from ZIO failures using catching, fallback, folding, retrying, timing out, and sandboxing — operators that work on typed errors, defects, a... - [Retrying](https://zio.dev/reference/error-management/recovering/retrying.md): ZIO retry mechanisms for handling transient failures with configurable policies and fallback recovery strategies. - [Sandboxing](https://zio.dev/reference/error-management/recovering/sandboxing.md): Use ZIO's sandbox, unsandbox, and sandboxWith operators to expose and recover from the full Cause graph — including defects and interruptions — not... - [Timing out](https://zio.dev/reference/error-management/recovering/timing-out.md): ZIO timeout combinators for managing effect execution time limits with safe interruption handling and customizable error recovery strategies. - [Sequential and Parallel Errors](https://zio.dev/reference/error-management/sequential-and-parallel-errors.md): Understand how ZIO handles multiple errors from sequential and parallel compositions using Cause.Then, Cause.Both, and the parallelErrors combinator. - [Typed Errors Guarantees](https://zio.dev/reference/error-management/typed-errors-guarantees.md): Typed errors in ZIO guarantee that the E parameter covers only typed failures — defects and interruptions remain possible even when E is Nothing. - [Defects](https://zio.dev/reference/error-management/types/defects.md): Learn about ZIO defects—unexpected untyped errors created with ZIO.die—and how they differ from typed errors in error handling. - [Failures](https://zio.dev/reference/error-management/types/failures.md): Model expected typed errors in ZIO using ZIO.fail, including custom domain error types for better error handling and type safety. - [Fatal Errors](https://zio.dev/reference/error-management/types/fatals.md): Learn about fatal errors in ZIO — VirtualMachineError and its subtypes on the JVM — that bypass all error handling operators and immediately termin... - [Three Types of Errors](https://zio.dev/reference/error-management/index-4.md): Understand ZIO's three error types: failures (expected), defects (unexpected), and fatals (catastrophic), and how to handle each appropriately. - [Fiber](https://zio.dev/reference/fiber/fiber.md.md): Lightweight concurrency primitives for non-blocking, structured execution of ZIO effects with automatic supervision and interruption. - [FiberId](https://zio.dev/reference/fiber/fiberid.md): `FiberId` is the identity of a [Fiber](fiber.md), described by a globally unique sequence number and the time when it began life: - [Fiber.Status](https://zio.dev/reference/fiber/fiberstatus.md): `Fiber.Status` describes the current status of a [Fiber](fiber.md). - [Introduction to ZIO Fibers](https://zio.dev/reference/index-8.md): Virtual threads enabling lightweight concurrent execution on the JVM with typed error and success values. - [Introduction](https://zio.dev/index.md): ZIO contains a few data types that can help you solve complex problems in asynchronous and concurrent programming. ZIO data types categorize into t... - [Interrupting Blocking Operations](https://zio.dev/reference/interruption/blocking-operations.md): How ZIO interruption relates to blocking code: attemptBlocking, attemptBlockingInterrupt and attemptBlockingCancelable, and how to cancel blocking ... - [Common Pitfalls and Known Limitations](https://zio.dev/reference/interruption/common-pitfalls.md): Interruption behaviours in ZIO that surprise people: timeouts inside uninterruptible regions, onInterrupt firing for collateral interruption, insta... - [Introduction to ZIO's Interruption Model](https://zio.dev/reference/index-9.md): Guide to ZIO's asynchronous interruption model: when fibers get interrupted, how interruptible and uninterruptible regions work, how finalizers and... - [Interruptible and Uninterruptible Regions](https://zio.dev/reference/interruption/interruptible-regions.md): How ZIO's interruptible and uninterruptible regions work: ZIO#uninterruptible, ZIO#interruptible, ZIO.uninterruptibleMask and what the restore func... - [Interruption, Finalizers, and Resource Safety](https://zio.dev/reference/interruption/interruption-and-finalizers.md): How ZIO guarantees resource safety under interruption: ensuring, onExit and onInterrupt finalizers, the acquireReleaseWith contract, why interrupti... - [Interrupting Fibers](https://zio.dev/reference/interruption/triggering-interruption.md): How to interrupt a fiber in ZIO: Fiber#interrupt and its fire-and-forget variants, self-interruption, reading the interruptor's FiberId out of a Ca... - [Introduction to Logging in ZIO](https://zio.dev/reference/observability/index.md): ZIO's lightweight built-in logging facade with support for log levels, spans, and contextual annotations. - [ZLogger](https://zio.dev/reference/observability/logging/zlogger.md): ZIO's functional logging trait: ZLogger[-Message, +Output] with composable fan-out, contramap, filterLogLevel, and ZTestLogger utilities. - [Counter](https://zio.dev/reference/observability/metrics/counter.md): A `Counter` is a metric representing a single numerical value that may be incremented over time. A typical use of this metric would be to track the... - [Frequency](https://zio.dev/reference/observability/metrics/frequency.md): A `Frequency` represents the number of occurrences of specified values. We can think of a `Frequency` as a set of counters associated with each val... - [Gauge](https://zio.dev/reference/observability/metrics/gauge.md): A `Gauge` is a metric representing a single numerical value that may be _set_ or _adjusted_. A typical use of this metric would be to track the cur... - [Histogram](https://zio.dev/reference/observability/metrics/histogram.md): A `Histogram` is a metric representing a collection of numerical with the distribution of the cumulative values over time. They organize a range of... - [Introduction to ZIO Metrics](https://zio.dev/reference/observability/index-2.md): ZIO's built-in metrics system for application observability with counter, gauge, histogram, summary, and frequency metric types. - [JVM Metrics](https://zio.dev/reference/observability/metrics/jvm.md): ZIO has built-in support for collecting JVM Metrics. These metrics are a direct port of the JVM metrics provided by the [Prometheus Java Hotspot li... - [MetricLabel](https://zio.dev/reference/observability/metrics/metriclabel.md): A `MetricLabel` metadata represents a key-value pair that allows analyzing metrics at an additional level of granularity. For example, if a metric ... - [Summary](https://zio.dev/reference/observability/metrics/summary.md): A `Summary` represents a sliding window of a time series along with metrics for certain percentiles of the time series, referred to as quantiles. - [Supervisor](https://zio.dev/reference/observability/supervisor.md): A `Supervisor[A]` is allowed to supervise the launching and termination of fibers, producing some visible value of type `A` from the supervision. - [Introduction to Tracing in ZIO](https://zio.dev/reference/observability/tracing.md): ZIO's distributed tracing support via OpenTelemetry API for tracking requests across multiple services in distributed systems. - [Cached: Automatic and Manual Resource Caching](https://zio.dev/reference/resource/cached.md): Cached provides automatic and manual caching of expensive resourceful values with scheduled refresh policies and graceful error handling. - [Introduction to Resource Management in ZIO](https://zio.dev/reference/index-10.md): ZIO resource management constructs for safe, composable acquisition and release of resources with guaranteed cleanup. - [Scope](https://zio.dev/reference/resource/scope.md): The Scope data type in ZIO represents resource lifetimes with guaranteed cleanup through finalizers, enabling safe and composable resource management. - [ScopedRef: Mutable Reference For Resources](https://zio.dev/reference/resource/scopedref.md): ScopedRef provides a resourceful mutable reference that automatically manages acquisition and release of scoped resources when values change. - [ZKeyedPool](https://zio.dev/reference/resource/zkeyedpool.md): The `ZKeyedPool[+Err, -Key, Item]` is a pool of items of type `Item` that are associated with a key of type `Key`. An attempt to get an item from a... - [ZPool](https://zio.dev/reference/resource/zpool.md): ZPool is an asynchronous pool of reusable resources for efficient management of expensive resources with dynamic sizing and lazy eviction policies. - [Schedule](https://zio.dev/reference/schedule.md): A composable, time-aware state machine for repeating and retrying ZIO effects with full control over timing, delays, and recurrence logic. - [Accessor Methods (deprecated)](https://zio.dev/reference/service-pattern/accessor-methods.md): Accessor methods are little helper methods that lookup a service from the environment, and then forward your call to - [Defining Polymorphic Services in ZIO](https://zio.dev/reference/service-pattern/defining-polymorphic-services-in-zio.md): As we discussed [here](../contextual/zenvironment.md), the `ZEnvironment`, which is the underlying data type used by `ZLayer`, is backed by a type-... - [Introduction to Writing ZIO Services](https://zio.dev/reference/introduction.md): Guide to ZIO Service Pattern: define maintainable services using interfaces and ZLayer for automatic dependency injection. - [Introduction to Reloadable Services](https://zio.dev/reference/service-pattern/reloadable-services.md): Learn how to implement reloadable services in ZIO with automatic resource management for configuration changes and scheduled refreshes. - [The Four Elements of Service Pattern](https://zio.dev/reference/service-pattern.md): Learn the four essential elements of ZIO Service Pattern: definition, implementation, dependencies, and ZLayer constructor lifting. - [The Three Laws of ZIO Environment](https://zio.dev/reference/service-pattern/the-three-laws-of-zio-environment.md): Master three ZIO environment laws: traits exclude dependencies, implementations use constructor injection, and business logic accesses services. - [Anatomy of a Built-in Service](https://zio.dev/reference/services/anatomy.md): How Clock, Console, Random, and System share one design: a service trait, a companion object with a Tag and accessors, a Live implementation, and a... - [Clock](https://zio.dev/reference/services/clock.md): Provides time-related operations for retrieving current time in various units, accessing date-time information, and non-blocking sleep functionality. - [Console](https://zio.dev/reference/services/console.md): Service providing simple I/O operations for reading/writing strings from/to standard input, output, and error console. - [Introduction to ZIO's Built-in Services](https://zio.dev/reference/index-11.md): Guide to ZIO's built-in services: Console, Clock, Random, and System with automatic environment management. - [Random](https://zio.dev/reference/services/random.md): Provides utilities to generate pseudo-random numbers with various generators including nextInt, nextBoolean, nextDouble, and Gaussian sampling. - [System](https://zio.dev/reference/services/system.md): Service providing access to environment variables, system properties, and platform-level information for application configuration. - [Fiber-local State](https://zio.dev/reference/state-management/fiber-local-state.md): Both the `FiberRef` and `ZState` data types are state management tools that are scoped to a certain fiber. Their values are only accessible within ... - [FiberRef: Introduction to Fiber-local Storage](https://zio.dev/reference/state-management/fiberref.md): Fiber-local storage enabling isolated state management and context propagation across concurrent fibers in ZIO. - [Global Shared State Using Ref](https://zio.dev/reference/state-management/global-shared-state.md): Manage global shared state in ZIO applications using Ref, enabling safe concurrent state sharing between fibers. - [Introduction to State Management in ZIO](https://zio.dev/reference/index-12.md): Overview of state management approaches in ZIO, covering recursion, global shared state with Ref, and fiber-local state with FiberRef and ZState. - [State Management Using Recursion](https://zio.dev/reference/state-management/recursion.md): This is a very common pattern to use variables to keep track of the state. For example, to calculate the length of a list, we can store intermediat... - [ThreadLocalBridge](https://zio.dev/reference/state-management/threadlocal-bridge.md): `ThreadLocalBridge` is a **service for synchronizing ZIO fiber-local state with Java `ThreadLocal` storage**. It enables seamless interoperability ... - [ZState](https://zio.dev/reference/state-management/zstate.md): `ZState[S]` models a value of type `S` that can be read from and written to during the execution of an effect. This is a higher-level construct bui... - [Introduction to Software Transactional Memory](https://zio.dev/reference/index-13.md): STM enables composable atomic transactions on memory with atomicity, consistency, and isolation guarantees for concurrent programs. - [STM](https://zio.dev/reference/stm/stm.md.md): STM[E, A] is a transactional effect supporting atomic operations with automatic rollback, error handling, and retry-based composition. - [TArray](https://zio.dev/reference/stm/tarray.md): `TArray` is an array of mutable references that can participate in transactions in STM. - [THub](https://zio.dev/reference/stm/thub.md): A `THub` is a transactional message hub. Publishers can publish messages to the hub and subscribers can subscribe to take messages from the hub. - [TMap](https://zio.dev/reference/stm/tmap.md): A `TMap[A]` is a mutable map that can participate in transactions in STM. - [TPriorityQueue](https://zio.dev/reference/stm/tpriorityqueue.md): A `TPriorityQueue[A]` is a mutable queue that can participate in STM transactions. A `TPriorityQueue` contains values of type `A` for which an `Ord... - [TPromise](https://zio.dev/reference/stm/tpromise.md): `TPromise` is a mutable reference that can be set exactly once and can participate in transactions in STM. - [TQueue](https://zio.dev/reference/stm/tqueue.md): Mutable queue for STM transactions with bounded/unbounded capacity and blocking operations for safe concurrent data sharing. - [TRandom](https://zio.dev/reference/stm/trandom.md): `TRandom` is a random service like [Random](../services/random.md) that provides utilities to generate random numbers, but they can participate in ... - [TReentrantLock](https://zio.dev/reference/stm/treentrantlock.md): A `TReentrantLock` allows safe concurrent access to some mutable state efficiently, allowing multiple fibers to read the - [TRef](https://zio.dev/reference/stm/tref.md): TRef is a mutable reference to immutable values that participates in STM transactions with atomicity, consistency, and isolation guarantees. - [TSemaphore](https://zio.dev/reference/stm/tsemaphore.md): `TSemaphore` is a semaphore with transactional semantics that can be used to control access to a common resource. It - [TSet](https://zio.dev/reference/stm/tset.md): A `TSet[A]` is a mutable set that can participate in transactions in STM. - [Chunk](https://zio.dev/reference/stream/chunk.md): A `Chunk[A]` represents a chunk of values of type `A`. Chunks are usually backed by arrays, but expose a purely functional, safe interface to the u... - [Introduction to ZIO Streams](https://zio.dev/reference/index-14.md): The primary goal of a streaming library is to introduce **a high-level API that abstracts the mechanism of reading and writing operations using dat... - [SubscriptionRef](https://zio.dev/reference/stream/subscription-ref.md): A `SubscriptionRef[A]` is a `Ref` that lets us subscribe to receive the current value along with all changes to that value. - [Channel Interruption](https://zio.dev/reference/stream/zchannel/channel-interruption.md): We can interrupt a channel using the `ZChannel.interruptWhen` operator. It takes a ZIO effect that will be evaluated, if it finishes before the cha... - [Channel Operations](https://zio.dev/reference/stream/zchannel/channel-operations.md): The values from the output port of the first channel are passed to the input port of the second channel when we pipe a channel to another channel: - [Composing Channels](https://zio.dev/reference/stream/zchannel/composing-channels.md): We can write more complex channels by using `read` operators and composing them recursively. - [Creating Channels](https://zio.dev/reference/stream/zchannel/creating-channels.md): `ZChannel` have several constructors and also built-in channels, where suitable to create more complex channels. - [Introduction To ZChannels](https://zio.dev/reference/stream/index.md): Channels are the nexus of communications, which support both reading and writing. They allow us to have a unidirectional flow of data from the inpu... - [Running a Channel](https://zio.dev/reference/stream/zchannel/running-a-channel.md): To run a channel, we can use the `ZChannel.runXYZ` methods: - [ZPipeline](https://zio.dev/reference/stream/zpipeline.md): A `ZPipeline[-Env, +Err, -In, +Out]` is a stream transformer. Pipelines accept a stream as input and return the transformed stream as output. - [Parallel Operators](https://zio.dev/reference/stream/zsink/parallel-operators.md): Like `ZStream`, two `ZSink` can be zipped together. Both of them will be run in parallel, and their results will be combined in a tuple: - [Creating Sinks](https://zio.dev/reference/stream/zsink/creating-sinks.md): The `zio.stream` provides numerous kinds of sinks to use. - [Introduction to ZSink](https://zio.dev/reference/stream/index-2.md): A `ZSink[R, E, I, L, Z]` is used to consume elements produced by a [`ZStream`](../zstream/index.md). You can think of a sink as a function that wil... - [Leftovers](https://zio.dev/reference/stream/zsink/leftovers.md): A sink consumes a variable amount of `I` elements (zero or more) from the upstream. If the upstream is finite, we can collect leftover values by ca... - [Sink Operations](https://zio.dev/reference/stream/zsink/operations.md): Having created the sink, we can transform it with provided operations. - [Consuming Streams](https://zio.dev/reference/stream/zstream/consuming-streams.md): ```scala - [Creating ZIO Streams](https://zio.dev/reference/stream/zstream/creating-zio-streams.md): There are several ways to create ZIO Stream. In this section, we are going to enumerate some of the important ways of creating `ZStream`. - [Error Handling](https://zio.dev/reference/stream/zstream/error-handling.md): If we have a stream that may fail, we might need to recover from the failure and run another stream, the `ZStream#orElse` takes another stream, so ... - [Introduction to ZStream](https://zio.dev/reference/stream/index-3.md): A `ZStream[R, E, O]` is a description of a program that, when evaluated, may emit zero or more values of type `O`, may fail with errors of type `E`... - [Operations](https://zio.dev/reference/stream/zstream/operations.md): Tapping is an operation of running an effect on each emission of the ZIO Stream. We can think of `ZStream#tap` as an operation that allows us to ob... - [Resourceful Streams](https://zio.dev/reference/stream/zstream/resourceful-streams.md): Most of the constructors of `ZStream` have a special variant to lift a scoped resource to a Stream (e.g. `ZStream.fromReaderScoped`). By using thes... - [Scheduling](https://zio.dev/reference/stream/zstream/scheduling.md): ZStream scheduling combinators for controlling emission timing and spacing of stream outputs using configurable schedule policies. - [Streams Are Chunked by Default](https://zio.dev/reference/stream/zstream/streams-are-chunked-by-default.md): Every time we are working with streams, we are always working with chunks. There are no streams with individual elements, these streams have always... - [Type Aliases](https://zio.dev/reference/stream/zstream/type-aliases.md): The `ZStream` data type, has two type aliases: - [ConcurrentMap](https://zio.dev/reference/sync/concurrentmap.md): Thread-safe concurrent data structure for atomic key-value pair operations - [ConcurrentSet](https://zio.dev/reference/sync/concurrentset.md): Thread-safe set wrapper using ConcurrentHashMap for concurrent ZIO operations. - [CountdownLatch](https://zio.dev/reference/sync/countdownlatch.md): A synchronization primitive that allows fibers to wait until a set of operations in other fibers complete. - [CyclicBarrier](https://zio.dev/reference/sync/cyclicbarrier.md): Enables multiple fibers to synchronize at a common barrier point that resets cyclically for repeated synchronization cycles. - [Introduction to ZIO's Synchronization Primitives](https://zio.dev/reference/index-15.md): Guide to ZIO's synchronization primitives and concurrent data structures for safely managing shared resources in concurrent environments. - [MVar](https://zio.dev/reference/sync/mvar.md): A single-element mutable buffer that synchronizes concurrent fibers, enabling semaphores, latches, and producer-consumer patterns. - [ReentrantLock](https://zio.dev/reference/sync/reentrantlock.md): Lock mechanism that allows the same fiber to acquire it multiple times with optional fairness policies. - [Annotating Tests](https://zio.dev/reference/test/aspects/annotating-tests.md): We can annotate the execution time of each test using the `timed` test aspect: - [Before, After, and Around Test Aspects](https://zio.dev/reference/test/aspects/before-after-around.md): 1. We can run an effect _before_, _after_, or _around_ every test: - [Conditional Aspects](https://zio.dev/reference/test/aspects/conditional.md): When we apply a conditional aspect, it will run the spec only if the specified predicate is satisfied. - [Configuring Tests](https://zio.dev/reference/test/aspects/configuring-tests.md): To run cases, there are some [default configuration settings](../services/test-config.md) which are used by test runner, such as _repeats_, _retrie... - [Debugging and Diagnostics](https://zio.dev/reference/test/aspects/debugging-and-diagnostics.md): 1. `TestAspect.debug` — When the `TestConsole` is in the debug state, the console output is rendered to the standard output in addition to being wr... - [Environment-specific Tests](https://zio.dev/reference/test/aspects/environment-specific-tests.md): To run a test on a specific operating system, we can use one of the `unix`, `mac` or `windows` test aspects or a combination of them. Additionally,... - [Execution Strategy](https://zio.dev/reference/test/aspects/execution-strategy.md): ZIO Test has two different strategies to run members of a test suite: _sequential_ and _parallel_. Accordingly, there are two test aspects for spec... - [Flaky and Non-flaky Tests](https://zio.dev/reference/test/aspects/flaky-and-non-flaky-tests.md): Whenever we deal with concurrency issues or race conditions, we should ensure that our tests pass consistently. The `nonFlaky` is a test aspect to ... - [Ignoring Tests](https://zio.dev/reference/test/aspects/ignoring-tests.md): To ignore running a test, we can use the `ignore` test aspect: - [Introduction to Test Aspects](https://zio.dev/reference/test/index.md): A `TestAspect` is an aspect that can be weaved into specs. We can think of an aspect as a polymorphic function, capable of transforming one test in... - [Non-deterministic Test Data](https://zio.dev/reference/test/aspects/non-deterministic-test-data.md): The random process of the `TestRandom` is said to be deterministic since, with the initial seed, we can generate a sequence of predictable numbers.... - [Passing Failed Tests](https://zio.dev/reference/test/aspects/passing-failed-tests.md): The `failing` aspect makes a test that failed for any reason pass. - [Repeat and Retry](https://zio.dev/reference/test/aspects/repeat-and-retry.md): Test aspects for repeating tests on a schedule and retrying failures until success with configurable policies. - [Restoring State of Test Services](https://zio.dev/reference/test/aspects/restoring-state-of-test-services.md): ZIO Test has some test aspects which restore the state of given restorable test services, such as `TestClock`, `TestConsole`, `TestRandom` and `Tes... - [Changing the Size of Sized Generators](https://zio.dev/reference/test/aspects/sized.md): To change the default _size_ used by [sized generators](../property-testing/built-in-generators.md#sized-generators) we can use `size` test aspect: - [Timing-out Tests](https://zio.dev/reference/test/aspects/timing-out-tests.md): The `timeout` test aspect takes a duration and times out each test. If the test case runs longer than the time specified, it is immediately cancele... - [Built-in Assertions](https://zio.dev/reference/test/assertions/built-in-assertions.md): Comprehensive reference guide to ZIO Test's built-in assertion functions organized by type for testing values and effects. - [Classic Assertions](https://zio.dev/reference/test/assertions/classic-assertions.md): Traditional assertion methods using assert and assertZIO functions for composing assertions to test values and ZIO effects in ZIO Test. - [Introduction to ZIO Test Assertions](https://zio.dev/reference/test/index-2.md): ZIO Test Assertions framework for composing assertions using logical operations and nested assertions to test values and effects. - [Smart Assertions](https://zio.dev/reference/test/assertions/smart-assertions.md): Smart Assertions enable simple assertions for ordinary values and ZIO effects using the assertTrue macro function with operators and nested value s... - [zio.test.diff.Diff](https://zio.dev/reference/test/zio-test-diff.md): When asserting two things are the same it's sometimes difficult to see the difference. Luckily there is a `zio.test.Diff` type-class. The purpose t... - [Dynamic Test Generation](https://zio.dev/reference/test/dynamic-test-generation.md): Tests in ZIO are dynamic. Meaning that they are not required to be statically defined at compile time. They can be generated at runtime effectfully. - [Introduction to ZIO Test](https://zio.dev/reference/index-16.md): Learn how ZIO Test makes tests first-class, effectful values that are tightly integrated with ZIO, so testing effectual programs is as natural as t... - [Installing ZIO Test](https://zio.dev/reference/test/installation.md): In order to use ZIO Test, we need to add the required configuration in our SBT settings: - [Integrating ZIO Test with JUnit](https://zio.dev/reference/test/junit-integration.md): Unit testing is an essential practice in software development, enabling developers to validate the correctness and reliability of their code. JUnit... - [Built-in Generators](https://zio.dev/reference/test/property-testing/built-in-generators.md): Comprehensive reference for ZIO Test property-based test generators including primitives, collections, functions, and ZIO effects. - [Getting Started With Property Checking](https://zio.dev/reference/test/property-testing/getting-started.md): Learn to test system properties using random input generators and property predicates with ZIO Test's Gen and check functions. - [How Generators Work?](https://zio.dev/reference/test/property-testing/how-generators-work.md): A `Gen[R, A]` represents a generator of values of type `A`, which requires an environment `R`. The `Gen` data type is the base functionality for ge... - [Introduction To Property Testing](https://zio.dev/reference/test/index-3.md): In property-based testing, instead of testing individual values and making assertions on the results, we rely on testing the properties of the syst... - [Operators](https://zio.dev/reference/test/property-testing/operators.md): 1. `Gen#zipWith` — Composes this generator with the specified generator to create a cartesian product of elements with the specified function: - [Shrinking](https://zio.dev/reference/test/property-testing/shrinking.md): In Property-Based Testing, we specify certain properties of a program, then we ask the testing framework to generate random test data to discover c... - [Running Tests](https://zio.dev/reference/test/running-tests.md): We can run ZIO Tests in two ways: - [TestClock](https://zio.dev/reference/test/services/clock.md): Provides deterministic time control in tests, enabling fast testing of time-dependent effects without waiting for real time. - [TestConsole](https://zio.dev/reference/test/services/console.md): `TestConsole` allows testing of applications that interact with the console by modeling working with standard input and output as writing and readi... - [Introduction](https://zio.dev/reference/test/index-4.md): ZIO Test has out of the box test implementations for all built-in ZIO services, such as `Console`, `Clock`, `Random` and `System` through the follo... - [Live](https://zio.dev/reference/test/services/live.md): The `Live` trait provides access to the _live_ environment from within the test environment for effects such as printing test results to the consol... - [TestRandom](https://zio.dev/reference/test/services/random.md): Supports deterministic testing of randomness using seed-based generation or predefined value feeding for reproducible property-based test scenarios. - [Sized](https://zio.dev/reference/test/services/sized.md): The `Sized` service enables the _Sized Generators_ to access the _size_ from the ZIO Test environment: - [TestSystem](https://zio.dev/reference/test/services/system.md): ZIO Test service for deterministic testing of system environment variables and JVM system properties in isolation. - [TestConfig](https://zio.dev/reference/test/services/config.md): The `TestConfig` service provides access to default configuration settings used by ZIO Test: - [Sharing Layers Between Multiple Files](https://zio.dev/reference/test/sharing-layers-between-multiple-files.md): In the previous example, we used the `Spec#provideXYZShared` methods to share layers between multiple specs in one file. In most cases, when the nu... - [Sharing Layers within the Same File](https://zio.dev/reference/test/sharing-layers-within-the-same-file.md): The `Spec` data type has a mechanism to share layers within all tests in a suite. Instead of acquiring and releasing dependencies for each test, we... - [Spec](https://zio.dev/reference/test/spec.md): Just like the `ZIO` data type, the `Spec` requires an environment of type `R`. When we write tests, we might need to access a service through the e... - [Test Hierarchies and Organization](https://zio.dev/reference/test/test-hierarchies-and-organization.md): A `Spec[R, E]` is the backbone of ZIO Test. All specs require an environment of type `R` and may potentially fail with an error of type `E`. - [Why ZIO Test?](https://zio.dev/reference/test/why-zio-test.md): In this section, we will discuss important features of the ZIO Test which help us to test our effectual code easily. - [Writing Our First Test](https://zio.dev/reference/test/writing-our-first-test.md): Any object that implements the `ZIOSpecDefault` trait is a runnable test. So to start writing tests we need to extend `ZIOSpecDefault`, which requi... - [Compositional FiberRef Updates with Differ](https://zio.dev/guides/compositional-fiberref-updates-with-differ.md): Learn how Differ[Value, Patch] powers compositional, patch-based FiberRef updates that faithfully merge concurrent fiber changes. - [ZIO Guides](https://zio.dev/index-2.md): The following guides have been written to help you get started with ZIO with minimal effort and without the need to fully understand the underlying... - [How to Interop with Cats Effect?](https://zio.dev/guides/interop/with-cats-effect.md): [`interop-cats`](https://github.com/zio/interop-cats) has instances for the [Cats](https://typelevel.org/cats/), [Cats MTL](https://github.com/type... - [How to Interop with Future?](https://zio.dev/guides/interop/with-future.md): Basic interoperability with Scala's `Future` is now provided by ZIO, and does not require a separate module. - [How to Interop with Java?](https://zio.dev/guides/interop/with-java.md): ZIO has full interoperability with foreign Java code. Let me show you how it works and then *BOOM*, tomorrow you can show off your purely functiona... - [How to Interop with JavaScript?](https://zio.dev/guides/interop/with-javascript.md): Include ZIO in your Scala.js project by adding the following to your `build.sbt`: - [How to Migrate From Akka to ZIO?](https://zio.dev/guides/migrate/from-akka.md): Here, we summarized alternative ZIO solutions for Akka Actor features. So before starting the migration, let's see an overview of corresponding fea... - [Migrate from Cats Effect to ZIO](https://zio.dev/guides/migrate/from-cats-effect.md): A comprehensive reference for mapping cats-effect 3.x IO, Resource, Fiber, Ref, Deferred, typeclasses, and the std module to their ZIO 2.x equivalents - [Migrate from Monix to ZIO 2.x](https://zio.dev/guides/migrate/from-monix.md): A comprehensive reference for mapping Monix 3.x Task, Coeval, Observable, TaskApp, Atomic, and monix.catnap to their ZIO 2.x equivalents - [ZIO 2.x Migration Guide](https://zio.dev/guides/migrate/zio-2.x-migration-guide.md): In this guide we want to introduce the migration process to ZIO 2.x. So if you have a project written in ZIO 1.x and want to migrate that to ZIO 2.... - [ZIO Quickstart: Building GraphQL Web Service](https://zio.dev/guides/quickstarts/graphql-webservice.md): This quickstart shows how to build a GraphQL web service using ZIO. It uses - [ZIO Quickstart: Hello World](https://zio.dev/guides/quickstarts/hello-world.md): Simple introductory guide to creating your first ZIO application using ZIOAppDefault and Console operations for effect composition. - [ZIO Quickstart: Building RESTful Web Service](https://zio.dev/guides/quickstarts/restful-webservice.md): This quickstart shows how to build a RESTful web service using ZIO. It uses - [Build and Run a ZIO Application on Scala.js](https://zio.dev/guides/scala-js.md): Write ZIO libraries and browser applications that target Scala.js: cross-compilation, the JS runtime model, zio-json persistence, DOM rendering, an... - [Build and Run a ZIO Application on Scala Native](https://zio.dev/guides/scala-native.md): Configure sbt-crossproject to compile and link a ZIO application as a Scala Native binary without the JVM. - [Tutorial: How to Build a GraphQL Web Service](https://zio.dev/guides/tutorials/build-a-graphql-webservice.md): Having GraphQL APIs enables the clients the ability to query the exact data they need. This powerful feature makes GraphQL more flexible than RESTf... - [Tutorial: How to Build a RESTful Web Service](https://zio.dev/guides/tutorials/build-a-restful-webservice.md): ZIO provides good support for building RESTful web services. Using _Service Pattern_, we can build web services that are modular and easy to test a... - [Tutorial: How to Create a Custom Logger for a ZIO Application?](https://zio.dev/guides/tutorials/create-custom-logger-for-a-zio-application.md): As we have seen in the [previous tutorial](enable-logging-in-a-zio-application.md), ZIO has a variety of built-in logging facilities. Also, it has ... - [Tutorial: How to Debug a ZIO Application?](https://zio.dev/guides/tutorials/debug-a-zio-application.md): Tutorial for debugging ZIO applications using the ZIO.debug effect, print statements, and IDE debuggers for functional effects. - [Tutorial: How to Deploy a ZIO Application Using Docker?](https://zio.dev/guides/tutorials/deploy-a-zio-application-using-docker.md): Docker is a tool that allows us to package, ship, and run our applications in an isolated environment called a container. Using Docker, we can simp... - [Tutorial: How to Enable Logging in a ZIO Application](https://zio.dev/guides/tutorials/enable-logging-in-a-zio-application.md): ZIO has built-in support for logging. This tutorial will show you how to enable logging for a ZIO application. - [Tutorial: How to Encode and Decode JSON Data?](https://zio.dev/guides/tutorials/encode-and-decode-json-data.md): In this article, we will cover how to encode and decode JSON data. - [Getting Started with ThreadLocalBridge](https://zio.dev/guides/tutorials/getting-started-threadlocal-bridge.md): Learn to synchronize ZIO fiber-local state with Java ThreadLocal variables for seamless Java library interoperability. - [Tutorial: How to Gracefully Shutdown ZIO Applications?](https://zio.dev/guides/tutorials/gracefully-shutdown-zio-application.md): Graceful shutdown is a critical aspect of building robust and reliable software applications. It ensures that an application terminates smoothly, a... - [Tutorial: How to Make a ZIO Application Configurable?](https://zio.dev/guides/tutorials/configurable-zio-application.md): One of the most common requirements for writing an application is to be able to configure it, especially when we are writing cloud-native applicati... - [Tutorial: How to Monitor a ZIO Application Using ZIO's Built-in Metric System?](https://zio.dev/guides/tutorials/monitor-a-zio-application-using-zio-built-in-metric-system.md): ZIO has a built-in metric system that allows us to monitor the performance of our application. This is very useful for debugging and tuning our app... - [Tutorial: Hot-Swapping Services with Reloadable](https://zio.dev/guides/tutorials/reloadable-services.md): Welcome! In this tutorial we explore one of ZIO's most compelling runtime features: the ability to **hot-swap a service** while the application kee... - [Schedule Step by Step — Retry and Repeat Policies in ZIO](https://zio.dev/guides/tutorials/retry-and-repeat-policies-with-schedule.md): Learn how ZIO's Schedule works as a pure state machine, and build retry and repeat policies from primitives, composition, and the Driver API. - [Tutorial: How to Run Our First ZIO Project With VSCode?](https://zio.dev/guides/tutorials/run-our-first-zio-project-with-vscode.md): ZIO is a _type-safe_ library for building asynchronous and concurrent applications. The Scala compiler can catch a lot of errors at compile time si... - [Tutorial: How to Run Our First ZIO Project With IntelliJ IDEA?](https://zio.dev/guides/tutorials/run-our-first-zio-project-with-intellij-idea.md): IntelliJ IDEA is a popular IDE for Java developers. It is a powerful tool for developing Java applications. Fortunately, not only does it support t... - [Caliban](https://zio.dev/ecosystem/community/caliban.md): [Caliban](https://ghostdogpr.github.io/caliban/) is a purely functional library for creating GraphQL servers and clients in Scala. - [Distage](https://zio.dev/ecosystem/community/distage.md): [Distage](https://izumi.7mind.io/distage/) is a compile-time safe, transparent, and debuggable Dependency Injection framework for pure FP Scala. - [Fhir-indexer](https://zio.dev/ecosystem/community/fhir-indexer.md): [Fhir-indexer](https://github.com/royashcenazi/fhir-indexer) is a ZIO based library for fetching FHIR resources fast and easy. - [ZIO Ecosystem Community Libraries](https://zio.dev/ecosystem/index.md): In this section we are going to introduce some of the most important libraries that have first-class ZIO support from the community. - [LogStage](https://zio.dev/ecosystem/community/logstage.md): [LogStage](https://izumi.7mind.io/logstage/) is a zero-cost structural logging framework for Scala & Scala.js. - [MUnit ZIO](https://zio.dev/ecosystem/community/munit-zio.md): [MUnit ZIO](https://github.com/poslegm/munit-zio) is an integration library between MUnit and ZIO. - [Rezilience](https://zio.dev/ecosystem/community/rezilience.md): [Rezilience](https://github.com/svroonland/rezilience) is a ZIO-native library for making resilient distributed systems. - [Scala k8s](https://zio.dev/ecosystem/community/scala-k8s.md): [Scala k8s](https://github.com/hnaderi/scala-k8s) is a Kubernetes client, data models and typesafe manifest generation for scala, scalajs, and scal... - [Tamer](https://zio.dev/ecosystem/community/tamer.md): [Tamer](https://github.com/laserdisc-io/tamer) is a multi-functional Kafka connector for producing data based on [ZIO Kafka](https://github.com/zio... - [Tofu ZIO 2 Logging](https://zio.dev/ecosystem/community/tofu-zio2-logging.md): [Tofu](https://docs.tofu.tf/) is a functional toolkit modules providing a comprehensive set of tools adressing - [TranzactIO](https://zio.dev/ecosystem/community/tranzactio.md): [TranzactIO](https://github.com/gaelrenoux/tranzactio) is a ZIO wrapper for some Scala database access libraries, currently for [Doobie](https://gi... - [ZIO AMQP](https://zio.dev/ecosystem/community/zio-amqp.md): [ZIO AMQP](https://github.com/svroonland/zio-amqp) is a ZIO-based AMQP client for Scala. - [ZIO Apache Parquet](https://zio.dev/ecosystem/community/zio-apache-parquet.md): [ZIO Apache Parquet](https://github.com/grouzen/zio-apache-parquet) is a ZIO-powered Apache Parquet library. - [ZIO EclipseStore](https://zio.dev/ecosystem/community/zio-eclipsestore.md): [ZIO EclipseStore](https://github.com/riccardomerolla/zio-eclipsestore) is a ZIO-based library for type-safe, efficient, and boilerplate-free acces... - [ZIO gRPC](https://zio.dev/ecosystem/community/zio-grpc.md): [ZIO-gRPC](https://scalapb.github.io/zio-grpc/) lets us write purely functional gRPC servers and clients. - [ZIO K8s](https://zio.dev/ecosystem/community/zio-k8s.md): [ZIO K8S](https://github.com/coralogix/zio-k8s) is an idiomatic ZIO client for the Kubernetes API. - [ZIO Kinesis](https://zio.dev/ecosystem/community/zio-kinesis.md): [ZIO Kinesis](https://github.com/svroonland/zio-kinesis) is a ZIO-based AWS Kinesis client for Scala. - [ZIO NebulaGraph](https://zio.dev/ecosystem/community/zio-nebula.md): [zio-nebula](https://github.com/nebula-contrib/zio-nebula) is a simple wrapper around [nebula-java](https://github.com/vesoft-inc/nebula-java/) for... - [ZIO Pulsar](https://zio.dev/ecosystem/community/zio-pulsar.md): [ZIO Pulsar](https://github.com/apache/pulsar) is the _Apache Pulsar_ client for Scala with ZIO and ZIO Streams integration. - [ZIO Slick Interop](https://zio.dev/ecosystem/community/zio-slick-interop.md): [ZIO Slick Interop](https://github.com/ScalaConsultants/zio-slick-interop) is a small library, that provides interop between Slick and ZIO. - [ZIO Temporal](https://zio.dev/ecosystem/community/zio-temporal.md): [ZIO Temporal](https://zio-temporal.vhonta.dev/) is a ZIO library for Temporal, a microservice workflow orchestration platform. - [ZIO Test Akka HTTP](https://zio.dev/ecosystem/community/zio-test-akka-http.md): [ZIO Test Akka HTTP](https://github.com/senia-psm/zio-test-akka-http) is an Akka-HTTP Route TestKit for zio-test. - [ZparkIO](https://zio.dev/ecosystem/community/zparkio.md): [ZParkIO](https://github.com/leobenkel/ZparkIO) is a boilerplate framework to use _Spark_ and _ZIO_ together. - [ZIO Compatible Libraries](https://zio.dev/ecosystem/compatible.md): List of ZIO compatible libraries: - [ZIO Ecosystem](https://zio.dev/index-3.md): ZIO has a rich ecosystem of libraries and tools that enhance its capabilities and provide additional functionality. This ecosystem includes librari... - [ZIO Ecosystem Official Libraries](https://zio.dev/ecosystem/index-2.md): Official ZIO libraries are hosted in the [ZIO organization](https://github.com/zio/) on GitHub, and are generally maintained by core contributors t... - [Project Templates](https://zio.dev/ecosystem/templates.md): List of project starters, bootstrap tools or, templates. - [ZIO Tools](https://zio.dev/ecosystem/tools.md): - [ZIO IntelliJ](https://github.com/zio/zio-intellij) — A complementary, community-developed plugin for IntelliJ IDEA, brings enhancements when usi... - [Resources](https://zio.dev/index-4.md): Looking for something specific? It's probably already got a home: - [ZIO Events](https://zio.dev/index-5.md): ZIO has a number of events that are organized by the community all around the world. These events are a great way to learn about ZIO, meet other ZI... - [Frequently Answered Questions (FAQ)](https://zio.dev/faq.md): Guidance on encoding contextual values like UserId and CorrelationId in ZIO applications, covering design patterns and the Z prefix convention. - [ZIO Adopters](https://zio.dev/adopters.md): Following is a partial list of companies happily using ZIO in production to craft concurrent applications. - [Compile Time Errors for Handling Combinators](https://zio.dev/can_fail.md): Error handling combinators in ZIO that require CanFail implicit evidence for compile-time safety - [Code of Conduct](https://zio.dev/code-of-conduct.md): Outlines the ZIO project's Code of Conduct, community standards, moderation governance structure, and the role of the Steering Committee and BDFL. - [Coding Guidelines](https://zio.dev/coding-guidelines.md): These are coding guidelines strictly for ZIO contributors working on ZIO projects and not general conventions to be applied by the Scala community ... - [Contributing to The ZIO Documentation](https://zio.dev/contributing-to-documentation.md): A comprehensive guide for contributing to the ZIO documentation, covering editing methods via GitHub and local development, the Markdown-based tool... - [Contributing to the ZIO Ecosystem Projects](https://zio.dev/contributing-to-zio-ecosystem.md): The ZIO ecosystem is provided by a worldwide community, just like the project itself. So if you are reading this page, you can help us to improve t... - [Contributor Guidelines](https://zio.dev/contributor-guidelines.md): Thank you for your interest in contributing to ZIO, which is a small, zero-dependency library for doing type-safe, composable concurrent and asynch... - [Introduction to izumi-reflect](https://zio.dev/index-6.md): [![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stag... - [ZIO AMQP](https://zio.dev/index-7.md): ZIO AMQP is a ZIO-based wrapper around the RabbitMQ client. It provides a streaming interface to AMQP queues and helps to prevent you from shooting... - [Artifacts](https://zio.dev/zio-aws/artifacts.md): ```scala - [Aspects](https://zio.dev/zio-aws/aspects.md): It is possible to define _aspects_ of type `AwsCallAspect[R]` that can modify the behavior of the AWS client modules. This can be used for example - [Changelog](https://zio.dev/zio-aws/changelog.md): Note: this is a manually maintained list of important changes. Because of having auto-release from CI, this - [Configuration](https://zio.dev/zio-aws/configuration.md): Each _service module_ depends on the `AwsConfig` layer. This layer is responsible for setting up the - [Examples](https://zio.dev/zio-aws/examples.md): The following example uses the ElasticBeanstalk and EC2 APIs to print some info. - [Summary](https://zio.dev/zio-aws/getting-started-2.md): Low-level AWS wrapper for [ZIO](https://zio.dev) for _all_ AWS services using the AWS Java SDK v2. - [HTTP](https://zio.dev/zio-aws/http.md): By default the AWS Java SDK uses _netty_ under the hood to make the HTTP client calls. `zio-aws` defines the http client - [Overview](https://zio.dev/index-8.md): [ZIO AWS](https://zio.dev/zio-aws) is AWS wrapper for [ZIO](https://zio.dev) for _all_ AWS services using the AWS Java SDK v2. - [Migration guide](https://zio.dev/zio-aws/migration-guide.md): There are some major changes compared to the ZIO 1 version (v3.x.x.x and v4.x.x.x). This section contains detailed information about what changed a... - [Wrappers](https://zio.dev/zio-aws/wrappers.md): The live implementation depends on a core _AWS configuration layer_: - [Getting Started with ZIO Bson](https://zio.dev/index-9.md): [ZIO Bson](https://github.com/zio/zio-bson) is BSON library with tight ZIO integration. - [Type Mappings](https://zio.dev/zio-bson/types.md): ZIO Bson provides `BsonEncoder` and `BsonDecoder` typeclass instances for a wide range of Scala and Java types. - [Cache Statistics](https://zio.dev/zio-cache/cache-statistics.md): ZIO Cache automatically tracks various statistics associated with the cache, such as the number of cache hits and misses and the current size of th... - [Cache](https://zio.dev/zio-cache/cache.md): A cache is defined in terms of a lookup function, a capacity, and a time to live. - [Entry Statistics](https://zio.dev/zio-cache/entry-statistics.md): ZIO Cache also tracks statistics associated with each entry, such as when the entry was last accessed. You can access the statistics for a specifie... - [Introduction to ZIO Cache](https://zio.dev/index-10.md): ZIO Cache is a library that makes it easy to optimize the performance of our application by caching values. - [Lookup](https://zio.dev/zio-cache/lookup.md): A `Lookup` is a lookup function that, given a key of type `Key`, knows how to compute a value of type `Value`, requiring an environment of type `En... - [Args](https://zio.dev/zio-cli/args.md): The `Args` data type models command-line arguments. Arguments are name-less, position-based parameters passed to a command-line program that modify... - [Authorization with OAuth2](https://zio.dev/zio-cli/auth.md): A command-line application interacting with an external API might require some form of authentication, so that access is restricted for unauthorize... - [Bash and Zsh Completion](https://zio.dev/zio-cli/bash-and-zsh-completion.md): **ZIO CLI** supports a mechanism for performing tab completion of command line - [Built-in commands](https://zio.dev/zio-cli/built-in-commands.md): **ZIO CLI** automatically constructs some common commands: - [Cli Configuration](https://zio.dev/zio-cli/cli-config.md): It is possible to tweak the behavior of our `CliApp` specifying a custom `CliConfig` in the parameter `cliConfig` of method `CliApp.make`. By defau... - [Commands](https://zio.dev/zio-cli/commands.md): A command is a piece of text representing a directive for a CLI application. This allows the user to communicate easily which task must perform the... - [Advanced example](https://zio.dev/zio-cli/examples.md): This example implements some git commands. The workflow is the one used before: - [Help Documentation](https://zio.dev/zio-cli/helpdoc.md): `HelpDoc` is a description of the documentation of a CLI App. They can be added to any `Command`, `Options` or `Args`. - [Introduction to ZIO CLI](https://zio.dev/index-11.md): Rapidly build powerful command-line applications powered by ZIO - [Options](https://zio.dev/zio-cli/options.md): The `Options` data type models command-line options. Contrary to arguments, options are named, position-independent parameters passed to a command-... - [ZIO CLI SBT Plugin](https://zio.dev/zio-cli/sbt-plugin.md): **ZIO CLI** offers an SBT plugin to provide some tasks to make generation and deployment of - [Automatic Derivation of Config](https://zio.dev/zio-config/automatic-derivation-of-config.md): By bringing in `zio-config-magnolia` we avoid all the boilerplate required to define the config. With a single import, `Config` is automatically d... - [Automatic Validations](https://zio.dev/zio-config/automatic-validations.md): By bringing in `zio-config-refined` module, you get validations for your config parameters almost for free. - [Dive Into ZIO Config](https://zio.dev/zio-config/dive-into-zio-config.md): __Note that this documentation is for 1.x series. For newer versions, please refer to [docs](https://github.com/zio/zio-config/tree/master/docs) se... - [Getting Started with ZIO Config](https://zio.dev/index-12.md): [ZIO Config](https://zio.dev/zio-config/) is a ZIO-based library and act as an extension to core library ZIO's `Config` language. - [Integrations](https://zio.dev/zio-config/integrations.md): `zio-config` is also integrated with `enumeratum`, `cats`, `scalaz`, `aws-sdk`, `zio-aws`, `refined` etc. - [Read from various Sources](https://zio.dev/zio-config/read-from-various-sources.md): zio-config supports various sources. - [ZIO Config Resources](https://zio.dev/zio-config/resources.md): - [Easy Config For Your App](https://www.youtube.com/watch?v=4SrSKluyyKo) by Afsal Thaj (December 2020) — Managing application configuration can be... - [Introduction to ZIO Constraintless](https://zio.dev/index-13.md): ZIO Constraintless allows you to build programs as mere descriptions with maximum polymorphism, maximum modularity, zero abstraction leakage, and z... - [Introduction to ZIO Direct Style](https://zio.dev/index-14.md): ZIO Direct Style is a library that allows using directly-style i.e. imperative programming with ZIO effects which is based on the Monadless paradigm. - [ZIO-Direct IntelliJ Support](https://zio.dev/zio-direct/intellij-support.md): > It is highly recommended that you use Metals instead of IntelliJ for ZIO-Direct development since Metals correctly infers types for `defer` block... - [Other Supported Monads](https://zio.dev/zio-direct/other-supported-monads.md): As of RC5, zio-direct now supports ZStream and ZPure as well as `scala.concurrent.Future` and `scala.List`. The latter two are largely fully functi... - [Scala Constructs Supported by ZIO-Direct](https://zio.dev/zio-direct/supported-constructs.md): ZIO-direct supports using the following constructs inside of a `defer` block. Approximate translations of the what the Scala code looks like are av... - [Architecture](https://zio.dev/zio-dynamodb/concepts/architecture.md): In the below diagram you can see the different layers of library and its dependencies. - [High Level API](https://zio.dev/zio-dynamodb/concepts/high-level-api.md): The high level API relies on two mechanisms to provide type safety and reduce boilerplate code: - [Low Level API](https://zio.dev/zio-dynamodb/concepts/low-level-api.md): The low level API provides low level query creation and execution while still offering a large reduction in boilerplate. It's is based one to one o... - [Cats Effect Interop](https://zio.dev/zio-dynamodb/guides/ce-interop.md): The **`zio-dynamodb-ce`** cats effect interop module provides a way to use ZIO DynamoDB with Cats Effect 3 with minimal - [High Level API Cheat Sheet](https://zio.dev/zio-dynamodb/guides/cheat-sheet.md): Note this guide assumes the reader has some basic knowledge of [AWS DynamoDB API](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/... - [Codec Customization](https://zio.dev/zio-dynamodb/guides/codec-customization.md): ```scala - [High Level API Data Modelling and Limitations](https://zio.dev/zio-dynamodb/guides/data-modelling.md): The High Level API relies heavily on ZIO Schema and inherits some of it's limitations, namely: - [Future Interop](https://zio.dev/zio-dynamodb/guides/future-interop.md): The **`zio-dynamodb-future`** interop module provides a way to use ZIO DynamoDB with vanilla scala Futures with minimal - [Getting Started](https://zio.dev/zio-dynamodb/guides/getting-started.md): ```scala - [Testing ZIO DynamoDB Applications](https://zio.dev/zio-dynamodb/guides/testing.md): The recommendation is to use full-stack integration tests of your ZIO DynamoDB repository code against a "local" DynamoDB - [DynamoDB Transactions](https://zio.dev/zio-dynamodb/guides/transactions.md): [Transactions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html) are as simple as calling the `.transaction` ... - [Introduction to ZIO DynamoDB](https://zio.dev/index-15.md): Simple, type-safe, and efficient access to DynamoDB - [Auto batching and parallelisation](https://zio.dev/zio-dynamodb/reference/auto-batching-and-parallelisation.md): When `DynamoDBQuery`'s are composed manually via the `zip` combinator function they become eligible for auto-batching and parallelisation in the `e... - [DynamoDBQuery](https://zio.dev/zio-dynamodb/reference/dynamodb-query.md): When we use the Low or High Level API constructors to create a query we end up with the type `DynamoDBQuery` which is a sealed trait. - [Error Handling](https://zio.dev/zio-dynamodb/reference/error-handling.md): DynamoDBError is a sealed trait that represents all the possible errors that can occur when interacting with DynamoDB - [Field Traversal](https://zio.dev/zio-dynamodb/reference/hi-level-api/creating-models/field-traversal.md): We will be using the below model for the examples which contains a complex collection field `hobbies` and a nested case - [Creating Models](https://zio.dev/zio-dynamodb/reference/hi-level-api/index.md): The High Level API provides automatic serialization and deserialization of Scala case classes to and from DynamoDB types. - [deleteFrom](https://zio.dev/zio-dynamodb/reference/hi-level-api/crud-operations/delete.md): ```scala - [get](https://zio.dev/zio-dynamodb/reference/hi-level-api/crud-operations/get.md): ```scala - [CRUD Operations](https://zio.dev/zio-dynamodb/reference/hi-level-api/index-2.md): The High Level API mirrors the CRUD operations of DDB but with a high level of type safety. - [put](https://zio.dev/zio-dynamodb/reference/hi-level-api/crud-operations/put.md): ```scala - [update](https://zio.dev/zio-dynamodb/reference/hi-level-api/crud-operations/update.md): ```scala - [High Level API](https://zio.dev/zio-dynamodb/reference/index.md): High Level API constructors for CRUD operations are found on the `DynamoDBQuery` companion object. They rely on a - [Primary Keys](https://zio.dev/zio-dynamodb/reference/hi-level-api/primary-keys.md): In the native AWS DynamoDB API primary keys are represented in two different ways depending on context: - [Scan and Query Operations](https://zio.dev/zio-dynamodb/reference/hi-level-api/index-3.md): The High Level API mirrors the Scan and Query operations of DDB but with a high level of type safety. - [queryAll](https://zio.dev/zio-dynamodb/reference/hi-level-api/scan-and-query-operations/query-all.md): ```scala - [querySome](https://zio.dev/zio-dynamodb/reference/hi-level-api/scan-and-query-operations/query-some.md): ```scala - [scanAll](https://zio.dev/zio-dynamodb/reference/hi-level-api/scan-and-query-operations/scan-all.md): ```scala - [scanSome](https://zio.dev/zio-dynamodb/reference/hi-level-api/scan-and-query-operations/scan-some.md): ```scala - [AttributeValue](https://zio.dev/zio-dynamodb/reference/low-level-api/attribute-value.md): The sealed trait `AttributeValue` has a one to one correspondence with the concept of an [attribute value in the AWS DDB API](https://docs.aws.amaz... - [$ and parse functions](https://zio.dev/zio-dynamodb/reference/low-level-api/dollar-function.md): The `$` and `parse` functions are the primary way to create a `ProjectionExpression` in the Low Level API. - [Low Level API](https://zio.dev/zio-dynamodb/reference/index-2.md): Low Level API operations are found on the `DynamoDBQuery` companion object. All the function names contain the word `Item` to indicate that they ar... - [ProjectionExpression](https://zio.dev/zio-dynamodb/reference/projection-expression.md): The `ProjectionExpression` API is common to both the Type Safe High Level API (with the exception the primary keys API) - [ZIO DynamoDB JSON Module](https://zio.dev/zio-dynamodb/reference/zio-dynamodb-json.md): **`zio-dynamodb-json`** is a new experimental optional module designed for debugging and troubleshooting purposes. - [Environment](https://zio.dev/zio-ftp/environment.md): FtpClient & Blocking - [ZIO FTP](https://zio.dev/index-16.md): [ZIO FTP](https://zio.dev) is a thin wrapper over (s)Ftp client for [ZIO](https://zio.dev). - [Configuration](https://zio.dev/zio-json/configuration.md): By default, the field names of a case class are used as the JSON fields, but it is easy to override this with an annotation `@jsonField`. - [Decoding](https://zio.dev/zio-json/decoding.md): Say we want to be able to read some JSON like - [Encoding](https://zio.dev/zio-json/encoding.md): Assume we want to encode this case class - [Getting Started with ZIO Json](https://zio.dev/index-17.md): [ZIO Json](https://github.com/zio/zio-json) is a fast and secure JSON library with tight ZIO integration. - [Akka Http Interop](https://zio.dev/zio-json/interop/akka-http.md): An interop module is provided for [Akka Http 10.2.4](https://doc.akka.io/docs/akka-http/10.2.4/index.html) - [HTTP4s Interop](https://zio.dev/zio-json/interop/http4s.md): An interop module is provided for [HTTP4s v0.21](https://http4s.org/v0.21) - [Interop modules](https://zio.dev/zio-json/index.md): Integrations are provided several popular libraries, which are published as separate artifacts: - [Refined Interop](https://zio.dev/zio-json/interop/refined.md): ```scala - [Scalaz 7.x Interop](https://zio.dev/zio-json/interop/scalaz-7x.md): ```scala - [Manual Instances](https://zio.dev/zio-json/manual-instances.md): Sometimes it is easier to reuse an existing `JsonDecoder` rather than generate a new one. This can be accomplished using convenience methods on the... - [Performance](https://zio.dev/zio-json/performance.md): The following benchmarks are freely available to run on your hardware with `sbt "zioJsonJVM/jmh:run -prof gc"` and can be extended to include more ... - [Security](https://zio.dev/zio-json/security.md): A [Denial of Service](https://en.wikipedia.org/wiki/Denial-of-service_attack) (DOS) attack is a cyber-attack in which the perpetrator seeks to make... - [Avoiding chunk-breakers](https://zio.dev/zio-kafka/avoiding-chunk-breakers.md): ZIO streams are not just a simple sequence of elements. The elements are grouped into chunks, which makes many - [Tuning the consumer](https://zio.dev/zio-kafka/consumer-tuning.md): Zio-kafka's consumer can be tuned for: - [Consuming Kafka topics using ZIO Streams](https://zio.dev/zio-kafka/consuming-kafka-topics-using-zio-streams.md): You can stream data from Kafka using the `plainStream` method: - [Consuming, Producing and Committing Offsets](https://zio.dev/zio-kafka/consuming-producing-and-committing-offsets.md): Consuming from Kafka and then producing a transformed message back to Kafka, is a regular pattern in systems that use - [Creating a zio-kafka Consumer](https://zio.dev/zio-kafka/creating-a-consumer.md): Create a consumer with `Consumer.make`, passing some `ConsumerSettings`: - [Detecting Authorization Failures](https://zio.dev/zio-kafka/detecting-authorization-failures.md): When a Kafka consumer's `READ` access control list (ACL) is revoked at runtime, the Apache Kafka broker stops sending - [Getting Started with ZIO Kafka](https://zio.dev/index-18.md): [ZIO Kafka](https://github.com/zio/zio-kafka) is a Kafka client for ZIO. It provides a purely functional, streams-based interface to the Kafka - [Zio-Kafka Metrics](https://zio.dev/zio-kafka/metrics.md): Zio-kafka exposes all the metrics of the wrapped Java based consumer and producer, plus some more metrics about the - [Migrating to zio-kafka 3](https://zio.dev/zio-kafka/migrating-to-zio-kafka-3.md): Zio-kafka 3.0.0 brings a number of backwards incompatible changes: - [Partition Assignment And Offset Retrieval](https://zio.dev/zio-kafka/partition-assignment-and-offset-retrieval.md): `zio-kafka` offers several ways to control which Kafka topics and partitions are assigned to your application. - [Preventing duplicates](https://zio.dev/zio-kafka/preventing-duplicates.md): In zio-kafka processing of records runs asynchronously with partition management. This brings substantial performance - [Serialization and Deserialization](https://zio.dev/zio-kafka/serialization-and-deserialization.md): Zio-kafka deserializes incoming data, and deserializes outgoing data (both keys and values) from byte arrays to any - [Sharing a Consumer between multiple streams](https://zio.dev/zio-kafka/sharing-consumer.md): Often in a single application, you want to consume from multiple Kafka topics and process each topic in a distinct way. With `zio-kafka` you can us... - [Transactions](https://zio.dev/zio-kafka/transactions.md): > This document describes Kafka transactions for zio-kafka version 3.0.0 and later. - [Tutorial: How to Produce/Consume Data To/From Kafka Topics?](https://zio.dev/zio-kafka/tutorial.md): Kafka is a distributed, fault-tolerant, message-oriented event-store platform. It is used as a message broker for distributed applications. Zio-kaf... - [Writing Tests with the `zio-kafka-testkit` library](https://zio.dev/zio-kafka/writing-tests.md): Zio-kafka provides a `zio-kafka-testkit` library to help you test your code using zio-kafka. - [Introduction to ZIO Lambda](https://zio.dev/index-19.md): A ZIO-based AWS Custom Runtime compatible with GraalVM Native Image. - [Console Logger](https://zio.dev/zio-logging/console-logger.md): logger layer with configuration from config provider: - [File Logger](https://zio.dev/zio-logging/file-logger.md): logger layer with configuration from config provider: - [Formatting Log Records](https://zio.dev/zio-logging/formatting-log-records.md): A `LogFormat` represents a DSL to describe the format of text log messages. - [Introduction to ZIO Logging](https://zio.dev/index-20.md): [ZIO Logging](https://github.com/zio/zio-logging) is simple logging for ZIO apps, with correlation, context, and pluggable backends out of the box ... - [Java Platform/System Logger](https://zio.dev/zio-logging/jpl.md): [`Java Platform/System Logger`](https://openjdk.org/jeps/264) is logging API which was introduced in Java 9. - [java.util.logging bridge](https://zio.dev/zio-logging/jul-bridge.md): It is possible to use `zio-logging` for included `java.util.logging` Loggers (do not confuse with `java.platform.logging`), - [Log Filter](https://zio.dev/zio-logging/log-filter.md): A `LogFilter` represents function/conditions for log filtering. - [Logger Context and Annotations](https://zio.dev/zio-logging/logger-context-and-annotations.md): The `logContext` fiber reference is used to store typed, structured log - [Log Metrics](https://zio.dev/zio-logging/metrics.md): Log metrics collecting metrics related to ZIO logging (all `ZIO.log*` functions). - [Reconfigurable Logger](https://zio.dev/zio-logging/reconfigurable-logger.md): `ReconfigurableLogger` is adding support for updating logger configuration in application runtime. - [SLF4J v1 bridge](https://zio.dev/zio-logging/slf4j1-bridge.md): It is possible to use `zio-logging` for SLF4J loggers, usually third-party non-ZIO libraries. To do so, import the `zio-logging-slf4j-bridge` modul... - [SLF4J v1](https://zio.dev/zio-logging/slf4j1.md): The Simple Logging Facade for Java ([`SLF4J v1`](https://www.slf4j.org/) - working with JDK8) serves as a simple facade or abstraction for various ... - [SLF4J v2 bridge](https://zio.dev/zio-logging/slf4j2-bridge.md): It is possible to use `zio-logging` for SLF4J loggers, usually third-party non-ZIO libraries. To do so, import the `zio-logging-slf4j2-bridge` mod... - [SLF4J v2](https://zio.dev/zio-logging/slf4j2.md): The Simple Logging Facade for Java ([`SLF4J v2`](https://www.slf4j.org/) - using JDK9+ module system [JPMS](http://openjdk.java.net/projects/jigsaw... - [Testing](https://zio.dev/zio-logging/testing.md): ZIO 2 test library has test logger implementation for testing: - [Introduction to ZIO Meta](https://zio.dev/index-21.md): Meta-programming helpers - [Getting Started](https://zio.dev/zio-metrics-connectors/getting-started.md): ZIO Metrics lets you observe everything that goes on in your ZIO application. - [Introduction to ZIO Metrics Connectors](https://zio.dev/index-22.md): ZIO Metrics Connectors provides integration between ZIO metrics and industry-leading monitoring and observability systems such as - [Datadog Client](https://zio.dev/zio-metrics-connectors/metrics/datadog-client.md): In a normal DataDog setup we will find a DataDog agent with an open UDP port where applications send their - [Metrics](https://zio.dev/zio-metrics-connectors/index.md): ZIO Metrics allows you to apply special aspects to the workflows of any ZIO based application. This is called - [Instrumentation Examples](https://zio.dev/zio-metrics-connectors/metrics/instrumentation-examples.md): The trait below is used in the - [ZIO Metric Reference](https://zio.dev/zio-metrics-connectors/metrics/metric-reference.md): All ZIO metrics are defined in the form of aspects that can be applied with `@@` to measure an effect. Applying an - [Micrometer Connector](https://zio.dev/zio-metrics-connectors/metrics/micrometer-connector.md): ZIO Metrics has an integration with [Micrometer](https://micrometer.io/), a powerful metrics instrumentation library. - [Prometheus Client](https://zio.dev/zio-metrics-connectors/metrics/prometheus-client.md): In a normal prometheus setup we will find prometheus agents which query configured endpoints at regular intervals. The - [StatsD Client](https://zio.dev/zio-metrics-connectors/metrics/statsd-client.md): ```scala - [Introduction to ZIO Parser](https://zio.dev/index-23.md): Library for constructing parsers and pretty printers based on invertible syntax descriptions - [ZIO Prelude Abstraction Diagrams](https://zio.dev/zio-prelude/functional-abstractions/abstraction-diagrams.md): ```mermaid - [Associative](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/associative.md): `Associative[A]` describes a way of combining two values of type `A` that is associative. - [Commutative](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/commutative.md): `Commutative[A]` describes a data type that has a `combine` operator that is commutative and associative. - [Debug](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/debug.md): `Debug[A]` describes the ability to render a value of type `A` to a human readable format for debugging purposes. - [Equal](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/equal.md): `Equal[A]` describes the ability to compare two values of type `A` for equality. - [Hash](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/hash.md): `Hash[A]` describes the ability to hash a value of type `A`. - [Identity](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/identity.md): `Identity[A]` describes a data type with an associative combining operation that also has an identity element. - [Introduction](https://zio.dev/zio-prelude/functional-abstractions/index.md): ZIO Prelude features a set of fundamental functional abstractions for working with concrete data types. - [Inverse](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/inverse.md): `Inverse[A]` describes a type that has a `combine` operator and also has an `inverse` operator that is the inverse of the `combine` operator. - [Ord](https://zio.dev/zio-prelude/functional-abstractions/concrete-types/ord.md): `Ord[A]` describes a total ordering on values of type `A`. - [Introduction](https://zio.dev/zio-prelude/index.md): ZIO Prelude features a next generation approach to functional abstractions. This approach is based on the following ideas: - [AssociativeBoth](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/associativeboth.md): `AssociativeBoth[F]` describes a way of combining two values `F[A]` and `F[B]` into a value `F[(A, B)]` that is associative. - [AssociativeEither](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/associativeeither.md): `AssociativeEither` describes a way of combining two values `F[A]` and `F[B]` into a value `F[Either[A, B]]` that is associative. - [AssociativeFlatten](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/associativeflatten.md): `AssociativeFlatten[F]` describes a way of combining two layers of a value of type `F[F[A]]` into a `F[A]` in a way that is associative. - [CommutativeBoth](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/commutativeboth.md): `CommutativeBoth[F]` describes a way of combining two values `F[A]` and `F[B]` into a value `F[(A, B)]` that is commutative. - [CommutativeEither](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/commutativeeither.md): `CommutativeEither[F]` describes a way of combining two parameterized types `F[A]` and `F[B]` that is commutative. - [Contravariant](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/contravariant.md): `Contravariant` describes a parameterized type `F[A]` that potentially consumes but never produces `A` values. - [Covariant](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/covariant.md): `Covariant[F]` describes a parameterized type `F[A]` that potentially produces but never consumes `A` values. - [ForEach](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/foreach.md): `ForEach[F]` describes a parameterized type `F[A]` that contains zero or more values of type `A`. - [IdentityBoth](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/identityboth.md): `IdentityBoth[F]` describes an associative way to combine two values `F[A]` and `F[B]` into a value `F[(A, B)]` that also has an identity element o... - [IdentityEither](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/identityeither.md): `IdentityEither[F]` describes an associative way to combine two values `F[A]` and `F[B]` into a value `F[Either[A, B]]` with an identity value `non... - [IdentityFlatten](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/identityflatten.md): `IdentityFlatten[F]` describes a way of combining two layers of a value of type `F[F[A]]` into a `F[A]` in a way that is associative and has an ide... - [Introduction](https://zio.dev/zio-prelude/functional-abstractions/index-2.md): In addition to abstractions for concrete types, ZIO Prelude provides a set of functional abstractions to describe the common structure of _paramete... - [Invariant](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/invariant.md): `Invariant[F]` describes a parameterized type `F[A]` that potentially both consumes and produces `A` values. - [NonEmptyForEach](https://zio.dev/zio-prelude/functional-abstractions/parameterized-types/nonemptyforeach.md): `NomEmptyForEach[F]` describes a parameterized type `F[A]` that contains one or more values of type `A`. - [Equivalence](https://zio.dev/zio-prelude/functional-data-types/equivalence.md): An `Equivalence[A, B]` describes an equivalence relationship between two types `A` and `B`. - [Functional Data Types in ZIO Prelude](https://zio.dev/zio-prelude/index-2.md): ZIO Prelude includes several data types to help us model our domains more accurately and solve common problems. - [NonEmptyList](https://zio.dev/zio-prelude/functional-data-types/nonemptylist.md): `NonEmptyList` represents a `List` that is guaranteed not to be empty. - [These](https://zio.dev/zio-prelude/functional-data-types/these.md): `These[A, B]` is a data type that models a value that can be either a `Left` with a value of type `A`, a `Right` with a value of type `B`, or a `Bo... - [Validation](https://zio.dev/zio-prelude/functional-data-types/validation.md): A `Validation[E, A]` is a data type that is either a `Success` with a value of type `A` or a `Failure` with one or more errors of type `E`. - [ZSet](https://zio.dev/zio-prelude/functional-data-types/zset.md): `ZSet` is a version of a set that generalizes the measure of "how many times" each element appears in the set. - [ZValidation](https://zio.dev/zio-prelude/functional-data-types/zvalidation.md): Like many other data types in ZIO, the `Validation` data type we learned about before is actually a type alias for a more general data type called ... - [Introduction to ZIO Prelude](https://zio.dev/index-24.md): [ZIO Prelude](https://github.com/zio/zio-prelude) is a lightweight, distinctly Scala take on **functional abstractions**, with tight ZIO integration. - [New Types](https://zio.dev/zio-prelude/index-3.md): ZIO Prelude provides functionality for creating zero overhead new types to allow you to increase the type safety of your application without compro... - [ZIO Prelude Resources](https://zio.dev/zio-prelude/resources.md): - [Refactoring Functional Type Classes](https://www.slideshare.net/jdegoes/refactoring-functional-type-classes) - slides by John De Goes and Adam F... - [ZPure](https://zio.dev/zio-prelude/index-4.md): A `ZPure[W, S1, S2, R, E, A]` is a description of a computation that requires an environment `R` and an initial state `S1` and either fails with an... - [Basics](https://zio.dev/zio-process/basics.md): To build a description of a command: - [Getting Started](https://zio.dev/zio-process/getting-started.md): ZIO Process - a purely functional command and process library based on ZIO. - [Introduction to ZIO Process](https://zio.dev/index-25.md): [ZIO Process](https://zio.dev/zio-process) is a simple ZIO library for interacting with external processes and command-line programs. - [Interactive Processes](https://zio.dev/zio-process/interactive-processes.md): Sometimes you want to interact with a process in a back-and-forth manner by sending requests to the process and receiving responses back. For examp... - [Other](https://zio.dev/zio-process/other.md): If you'd like to run a process and handle its input/output in the current process, you can inherit its I/O. For example, running the Scala REPL: - [Piping](https://zio.dev/zio-process/piping.md): You can pipe the output of one process as the input to another. For example, if you want to return a list of all running - [Introduction to ZIO Profiling](https://zio.dev/index-26.md): ZIO Profiling is a collection of different profilers for better understanding the runtime behavior of ZIO programs. - [Resources](https://zio.dev/zio-profiling/resources.md): - [Causal Profiling for functional effects](https://youtu.be/rdETYUc8XyI) by Maxim Schuwalow (2021) - [Creating Data Sources](https://zio.dev/zio-query/creating-data-sources.md): To construct a `ZQuery` that executes a request, you first need to create a `DataSource`. A `DataSource[R, A]` requires an environment `R` and is c... - [Creating Queries](https://zio.dev/zio-query/creating-queries.md): There are several ways to create a `ZQuery`. We've seen `ZQuery.fromRequest`, but you can also: - [Introduction to ZIO Query](https://zio.dev/index-27.md): [ZIO Query](https://github.com/zio/zio-query) is a library for writing optimized queries to data sources in a high-level compositional style. It ca... - [Running Queries](https://zio.dev/zio-query/running-queries.md): There are several ways to run a `ZQuery`: - [How to Contribute?](https://zio.dev/zio-quill/how-to-contribute.md): Instructions on how to contribute to Quill project. - [Additional Resources](https://zio.dev/zio-quill/additional-resources.md): In order to quickly start with Quill, we have setup some template projects: - [Quill Changelog](https://zio.dev/zio-quill/changelog.md): Starting from the versions superior v4.6.1, the release notes and changelog will be provided in the GitHub Releases of the project. - [Code Generation](https://zio.dev/zio-quill/code-generation.md): Quill now has a highly customizable code generator. Currently, it only supports JDBC but it will soon be extended to other contexts. With a minimal... - [Compiler performance](https://zio.dev/zio-quill/compiler-performance.md): Quill will probably make the slow scala compiler even slower, since a lot of additional `Parsing`, `Typechecking`, `Implicit resolution` works intr... - [Contexts](https://zio.dev/zio-quill/contexts.md): Contexts represent the database and provide an execution interface for queries. - [Extending Quill](https://zio.dev/zio-quill/extending-quill.md): Infix is a very flexible mechanism to use non-supported features without having to use plain queries in the target language. It allows the insertio... - [Getting Started with Quill](https://zio.dev/zio-quill/getting-started.md): > ### [Scastie](https://scastie.scala-lang.org/) is a great tool to try out Quill without having to prepare a local environment. It works with [mir... - [Introduction to ZIO Quill](https://zio.dev/index-28.md): Quill provides a Quoted Domain Specific Language ([QDSL](https://homepages.inf.ed.ac.uk/wadler/papers/qdsl/qdsl.pdf)) to express queries in Scala a... - [Logging](https://zio.dev/zio-quill/logging.md): To write compile-time queries to a log, use the `-Dquill.log.file=queries.sql` and specify - [Quill vs. Cassandra](https://zio.dev/zio-quill/quill-vs-cassandra.md): This document compares Quill to the [Datastax Java](https://github.com/datastax/java-driver) driver and the [Phantom](https://web.archive.org/web/2... - [Quill vs. Slick](https://zio.dev/zio-quill/quill-vs-slick.md): This document compares Quill to the [Typesafe Slick](https://scala-slick.org) library. This is an incomplete comparison, additions and corrections ... - [Writing Queries](https://zio.dev/zio-quill/writing-queries.md): The QDSL allows the user to write plain Scala code, leveraging Scala's syntax and type system. Quotations are created using the `quote` method and ... - [Introduction to ZIO Redis](https://zio.dev/index-29.md): [![Development](https://img.shields.io/badge/Project%20Stage-Development-green.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](ht... - [Introduction to ZIO RocksDB](https://zio.dev/index-30.md): A ZIO-based interface to RocksDB. - [Introduction to ZIO S3](https://zio.dev/index-31.md): Thin wrapper over S3 async client for ZIO - [Developer Notes](https://zio.dev/zio-sbt/developer-notes.md): - Add a command to make a version history page in documentation - [ZIO SBT](https://zio.dev/index-32.md): _ZIO SBT_ contains multiple sbt plugins that are useful for ZIO projects. It provides high-level SBT utilities that simplify the development of ZIO... - [Automatic Schema Derivation](https://zio.dev/zio-schema/automatic-schema-derivation.md): Automatic schema derivation is the process of generating schema definitions for data types automatically, without the need to manually write them. ... - [Basic Building Blocks](https://zio.dev/zio-schema/basic-building-blocks.md): To get started, first we need to understand that a ZIO Schema is basically built-up from these three - [Apache Avro Codecs](https://zio.dev/zio-schema/derivations/codecs/avro.md): Apache Avro is a popular data serialization format used in distributed systems, particularly in the Apache Hadoop ecosystem. In this article, we wi... - [Bson Codecs](https://zio.dev/zio-schema/derivations/codecs/bson.md): BSON (Binary JSON) is a binary serialization format used to store and exchange data efficiently. In this article, we will explore how to derive BSO... - [Introduction to ZIO Schema Codecs](https://zio.dev/zio-schema/derivations/index.md): Once we generate a schema for a type, we can derive a codec for that type. - [JSON Codecs](https://zio.dev/zio-schema/derivations/codecs/json.md): JSON (JavaScript Object Notation) is a widely used data interchange format for transmitting and storing data. ZIO Schema provides `zio-schema-json`... - [MessagePack Codecs](https://zio.dev/zio-schema/derivations/codecs/message-pack.md): MessagePack is a binary serialization format designed for efficient data exchange between different systems and languages. In this section, we will... - [Protobuf Codecs](https://zio.dev/zio-schema/derivations/codecs/protobuf.md): Protocol Buffers (protobuf) is a binary serialization format developed by Google. It is designed for efficient data exchange between different syst... - [Apache Thrift Codecs](https://zio.dev/zio-schema/derivations/codecs/thrift.md): Apache Thrift is an open-source framework that allows seamless communication and data sharing between different programming languages and platforms... - [Optics Derivation](https://zio.dev/zio-schema/derivations/optics-derivation.md): Optics are a way of accessing and manipulating data in a functional way. They can be used to get, set, and update values in data structures, as wel... - [Ordering Derivation](https://zio.dev/zio-schema/derivations/ordering-derivation.md): Standard Scala library provides a type class called `Ordering[A]` that allows us to compare values of type `A`. ZIO Schema provides a method called... - [Derivation of ZIO Test Generators](https://zio.dev/zio-schema/derivations/zio-test-gen-derivation.md): ZIO Test supports property-based testing via the `Gen` type. `Gen[R, A]` is a random generator of values of type `A`. Such a generator can be used ... - [Combining Different Encoders](https://zio.dev/zio-schema/examples/combining-different-encoders.md): Let's take a look at a round-trip converting an object to JSON and back, then converting it to a protobuf and back. This is a simple example, but i... - [Mapping DTO to Domain Object](https://zio.dev/zio-schema/examples/mapping-dto-to-domain-object.md): When we write layered applications, where different layers are decoupled from each other, we need to transfer data between layers. For example, ass... - [Introduction to ZIO Schema](https://zio.dev/index-33.md): [ZIO Schema](https://github.com/zio/zio-schema) is a [ZIO](https://zio.dev)-based library for modeling the schema of data structures as first-class... - [Integration with ZIO Streams](https://zio.dev/zio-schema/integration-with-zio-streams.md): In addition to the regular `encode` and `decode` functions, each codec also has a streaming version of these functions called `streamEncoder` and `... - [Manual Schema Construction](https://zio.dev/zio-schema/manual-schema-construction.md): Assume we have a domain containing following models: - [The Motivation Behind ZIO Schema](https://zio.dev/zio-schema/motivation.md): ZIO Schema is a library used in many ZIO projects such as _ZIO Flow_, _ZIO Redis_, _ZIO Web_, _ZIO SQL_ and _ZIO DynamoDB_. It is all about reifica... - [Diffing and Patching](https://zio.dev/zio-schema/operations/diffing-and-patching.md): ZIO Schema provides two methods called `diff` and `patch`: - [Dynamic Data Representation](https://zio.dev/zio-schema/operations/dynamic-data-representation.md): DynamicValue is a way to describe the entire universe of possibilities for schema values. It does that in a way that we can interact with and intro... - [ZIO Schema Operations](https://zio.dev/zio-schema/index.md): Once we have defined our schemas, we can use them to perform a variety of operations. In this section, we will explore some of the most common oper... - [Schema Migration](https://zio.dev/zio-schema/operations/schema-migration.md): With ZIO Schema, we can automatically migrate data from one version of a schema to another. As software evolves, we often need to add, change or re... - [Serialization of the Schema Itself](https://zio.dev/zio-schema/operations/schema-serialization.md): In distributed systems, we often need to move computations to data instead of moving data to computations. The data is big and the network is slow,... - [Getting The Default Value](https://zio.dev/zio-schema/operations/the-default-value.md): ZIO Schema provides a method called `defaultValue` that returns the default value of the underlying type described by the schema. This method retur... - [Transforming Schemas](https://zio.dev/zio-schema/operations/transforming-schemas.md): Using the `Schema#transform` method, we can transform a `Schema[A]` into a `Schema[B]` by supplying two functions that can transform between `A` an... - [Validation](https://zio.dev/zio-schema/operations/validation.md): When we create a schema for a type, we can also specify validation rules for the type. Validations are a way to ensure that the data conforms to ce... - [Standard Type Reference](https://zio.dev/zio-schema/standard-type-reference.md): ZIO Schema provides a number of built-in primitive types, that we can use to represent our data. These can be seen in the following table: - [ZIO Schema Use cases](https://zio.dev/zio-schema/use-cases.md): ZIO Schema allows us to create representations of our data types as values. - [Introduction to ZIO SQS](https://zio.dev/index-34.md): This library is a [ZIO](https://github.com/zio/zio)-powered client for AWS SQS. It is built on top of the [AWS SDK for Java 2.0](https://docs.aws.a... - [Compression and archives with zio-streams](https://zio.dev/index-35.md): [ZIO Streams Compress](https://github.com/zio/zio-streams-compress) integrates several compression algorithms and - [Introduction to ZIO Telemetry](https://zio.dev/index-36.md): [ZIO telemetry](https://github.com/zio/zio-telemetry) is purely-functional and type-safe. It provides clients for - [OpenCensus](https://zio.dev/zio-telemetry/opencensus.md): OpenCensus is a stats collection and distributed tracing framework. Well known implementations are [Jaeger](https://www.jaegertracing.io) - [OpenTelemetry Example](https://zio.dev/zio-telemetry/opentelemetry-example.md): You can find the source code [here](https://github.com/zio/zio-telemetry/tree/series/2.x/opentelemetry-example). - [OpenTelemetry Automatic Instrumentation Example](https://zio.dev/zio-telemetry/opentelemetry-instrumentation-example.md): You can find the source code [here](https://github.com/zio/zio-telemetry/tree/series/2.x/opentelemetry-instrumentation-example). - [OpenTelemetry ZIO Logging](https://zio.dev/zio-telemetry/opentelemetry-zio-logging.md): `zio-opentelemetry` logging facilities are implemented around OpenTelemetry Logging. - [OpenTelemetry](https://zio.dev/zio-telemetry/opentelemetry.md): OpenTelemetry is a collection of tools, APIs, and SDKs. You can use it to instrument, generate, collect, and export telemetry data for analysis in ... - [OpenTracing Example](https://zio.dev/zio-telemetry/opentracing-example.md): You can find the source code [here](https://github.com/zio/zio-telemetry/tree/series/2.x/opentracing-example). - [OpenTracing](https://zio.dev/zio-telemetry/opentracing.md): OpenTracing is a standard and API for distributed tracing, i.e. collecting timings, - [ZIO 2.x Interoperation with Cats 2.x](https://zio.dev/index-37.md): ```sbt