Skip to content

Latest commit

 

History

901 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZIO Telemetry

ZIO Telemetry is a purely functional, type-safe client for distributed tracing, metrics, logs, and baggage in ZIO applications. Its main module wraps OpenTelemetry; older modules wrap OpenTracing and OpenCensus, both deprecated upstream.

Production Ready CI Badge Sonatype Releases Sonatype Snapshots javadoc ZIO Telemetry

In a monolith, a request starts, passes through a few components, and finishes in one place. In a distributed system, the story of a request is spread across many services, and no single log tells it. Distributed tracing connects those pieces: every service records spans that share a trace, and the trace context travels between services with the request. ZIO Telemetry lets a ZIO effect be the scope of a span, correlates metrics and logs with the surrounding span, and propagates context across service boundaries.

Installation

The OpenTelemetry module is all most applications need. It is published for the JVM only, for Scala 2.12, 2.13, and 3:

libraryDependencies ++= Seq(
  // ZIO Telemetry for OpenTelemetry (JVM, Scala 2.12, 2.13, 3)
  "dev.zio" %% "zio-opentelemetry" % "3.1.22"
)

The module depends only on the OpenTelemetry API. To produce and export signals, an application also needs the OpenTelemetry SDK and an exporter; see Getting Started for a working setup.

Modules

The remaining modules are optional.

Integrations

To add trace and span ids to ZIO Logging output, use the logging integration:

libraryDependencies ++= Seq(
  // Span and trace id log formats for ZIO Logging (JVM, Scala 2.12, 2.13, 3)
  "dev.zio" %% "zio-opentelemetry-zio-logging" % "3.1.22"
)

See OpenTelemetry ZIO Logging.

Legacy Modules

OpenTracing is archived and OpenCensus is deprecated upstream, and new applications should use the OpenTelemetry module. These modules remain for existing code:

libraryDependencies ++= Seq(
  // ZIO Telemetry for OpenTracing (JVM, Scala 2.12, 2.13, 3)
  "dev.zio" %% "zio-opentracing" % "3.1.22",

  // ZIO Telemetry for OpenCensus (JVM, Scala 2.12, 2.13, 3)
  "dev.zio" %% "zio-opencensus" % "3.1.22"
)

See OpenTracing and OpenCensus.

Documentation

Learn more on the ZIO Telemetry homepage!

Contributing

For the general guidelines, see ZIO contributor's guide.

Code of Conduct

See the Code of Conduct

Support

Come chat with us on Badge-Discord.

License

License

Releases

Packages

Used by

Contributors

Languages