zio/zio-telemetry
68.1
Adequate · 20 September 2026
4.2k
lines of production code
Scala
with JavaScript
1
measurement over time
What this system is
This system is a functional telemetry library for ZIO applications that integrates distributed tracing, metrics, and logging via OpenTelemetry, OpenTracing, and OpenCensus. It provides ZIO-native layers for managing spans, propagating context and baggage across service boundaries, and exporting observability data to standard backends. The library also bridges ZIO's native metrics and logging systems with OpenTelemetry standards to enable comprehensive, type-safe observability.
How it got here
2019–2020 — Initial repository setup and telemetry integrations
9 changes.
This period established the ZIO Telemetry project foundation, including repository scaffolding, build tooling, and dependency management for ZIO 2.1. It introduced core integration modules for OpenTelemetry, OpenTracing, and OpenCensus, providing ZIO-aware APIs for distributed tracing, context propagation, and span management. The work also included comprehensive example applications and test suites to demonstrate these telemetry capabilities.
2021–2024 — OpenTelemetry integration expansion
17 changes.
This period focused on building out a comprehensive OpenTelemetry integration layer for ZIO, introducing native support for metrics, logging, and baggage alongside existing tracing capabilities. The work included developing core infrastructure for context propagation and span management, while expanding example applications to demonstrate full observability across multiple pillars. Extensive test coverage was added to validate the new modules and ensure correct behavior for distributed context and metric export.
Features
Add OpenTelemetry instrumentation example with ZIO HTTP and logging integration
The opentelemetry-instrumentation-example module now includes a complete runnable example demonstrating OpenTelemetry integration within a ZIO application. This includes a server application (ServerApp) that configures OpenTelemetry tracing and integrates with Logback via OpenTelemetryAppender to export logs, alongside a client application (ClientApp) that uses zio-http for HTTP communication. Configuration is managed via application.conf (binding to host 0.0.0.0, port 9000) and logback.xml, which sets up console and OpenTelemetry appenders. The example showcases how to wire OpenTelemetry services, including context layers, into a ZIO runtime.
opentelemetry-instrumentation-example · high confidence
Add ZIO OpenTelemetry logging demo application
A new demo application (ZioLoggingApp) has been added to the scala-cli/opentelemetry-zio-logging location, demonstrating how to integrate ZIO logging with OpenTelemetry. The application configures an OpenTelemetry SDK to export trace and log data in OTLP JSON format to stdout, and sets up ZIO logging to automatically include span and trace IDs in console output, allowing users to correlate log messages with distributed traces.
scala-cli/opentelemetry-zio-logging · high confidence
Add ZIO integration for OpenTelemetry Baggage
This change introduces a new \Baggage\ module within the ZIO OpenTelemetry integration, providing ZIO effects to manage distributed context baggage. Users can now extract and inject baggage data using the W3C Baggage Propagator, set and retrieve key-value pairs, and access all baggage entries (with optional metadata) from the current ZIO context. The implementation also supports automatically injecting ZIO log annotations into the baggage when enabled, ensuring that logging context is propagated alongside trace data.
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/baggage · high confidence
Add trace and span ID formatting to ZIO logging
The opentelemetry-zio-logging module now provides \traceId\ and \spanId\ log formats, allowing users to include OpenTelemetry trace and span identifiers directly in their log output. This is implemented via the new \LogFormats\ trait and \ZioLogging.logFormats\ layer, which extract the current span context from the ZIO environment to populate these values in log messages.
opentelemetry-zio-logging · high confidence
Initial OpenTracing integration for ZIO applications
This change introduces the \zio-telemetry-opentracing\ module, providing a ZIO layer that integrates with the OpenTracing API. It allows users to create root spans and child spans via \root\ and \span\ methods, propagate context across service boundaries using \spanFrom\, and manage baggage items. The implementation automatically tags and logs errors within spans when failures occur, and exposes ZIO aspects for declarative span creation.
opentracing/src/main · high confidence
Initial ZIO Telemetry microsite launch
The project now includes a dedicated documentation website built with Docusaurus, hosted at zio.github.io/zio-telemetry. This site provides an overview of ZIO Telemetry as a purely-functional, type-safe OpenTelemetry library, featuring sections on use cases for OpenTracing, OpenCensus, and OpenTelemetry, along with links to the Scaladoc, GitHub repository, and Discord community.
website · high confidence
Initial configuration for OpenTelemetry example application
The OpenTelemetry example now includes default configuration files to define its network endpoints and logging pipeline. The application configuration sets the proxy to listen on port 8080 and the backend on port 9000, while the Fluent Bit configuration enables an OpenTelemetry input listener on port 4318 that outputs logs to stdout.
opentelemetry-example/src/main/resources · high confidence
Initial repository setup and tooling configuration
The repository has been initialized with standard project configuration files, including a Contributor License Agreement (CLA), a README with installation instructions for ZIO Telemetry modules (OpenTelemetry, OpenTracing, OpenCensus), and build tooling settings. This includes a \.scalafmt.conf\ enforcing Scala 2.13 dialect and specific formatting rules, a \.scalafix.conf\ for import organization and unused code removal, and a \.mergify.yml\ to automate the merging of Scala Steward dependency updates. A vendored \sbt\ launcher script (version 1.5.7) and standard git ignore attributes are also included to standardize the development environment.
(repo-wide) · high confidence
Introduce OpenCensus tracing integration
Added a new OpenCensus client module that provides ZIO-aware distributed tracing capabilities. This includes a \Tracing\ trait with methods for creating spans (\span\, \root\, \fromRemoteSpan\, \fromRootSpan\), injecting context into carriers, and attaching attributes, along with corresponding ZIO aspects for declarative span management. The module also supplies implicit conversions to automatically map Boolean, String, Long, and Double values to OpenCensus \AttributeValue\ types for easier attribute assignment.
opencensus/src/main · high confidence
New OpenTelemetry example applications for Scala CLI
Added five new Scala CLI example applications (BaggageApp, LoggingApp, MetricsApp, PropagatingApp, TracingApp) that demonstrate how to integrate ZIO with OpenTelemetry for tracing, metrics, logging, and context propagation. These examples use zio-opentelemetry 3.1.19, OpenTelemetry SDK 1.66.0, and Scala 3.8.4, showcasing features like baggage propagation, log annotation correlation, observable counters, and span context injection/extraction.
scala-cli/opentelemetry · high confidence
New OpenTelemetry integration layer for ZIO
A new \OpenTelemetry\ entrypoint object has been added to the \zio-telemetry\ library, providing ZIO layers for manual instrumentation of tracing, metrics, logging, and baggage. This change introduces the ability to integrate with ZIO's native metrics system via the \zioMetrics\ layer, which propagates ZIO runtime metrics to OpenTelemetry, and supports propagating ZIO log annotations to OpenTelemetry span and metric attributes. It also exposes \contextZIO\ and \contextJVM\ layers to manage context storage for manual and automatic instrumentation scenarios respectively.
opentelemetry/src/main/scala/zio/telemetry/opentelemetry · high confidence
New OpenTelemetry metrics integration for ZIO applications
This release introduces a new metrics module that bridges ZIO Metrics with OpenTelemetry, allowing users to export ZIO counters, histograms, up-down counters, and gauges to any OpenTelemetry-compatible backend. The integration automatically maps ZIO metric keys to OpenTelemetry instruments, supports explicit histogram bucket boundaries, and can propagate ZIO log annotations as metric attributes. Users can now leverage standard OpenTelemetry observability tooling for their ZIO-based applications without manual instrumentation.
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/metrics · high confidence
New OpenTelemetry, OpenTracing, and OpenCensus example applications
The repository now includes complete example applications for OpenTelemetry, OpenTracing, and OpenCensus, demonstrating how to integrate distributed tracing into ZIO HTTP services. These examples provide a proxy and backend architecture that showcases key telemetry features, including context propagation, baggage handling, span creation, and metrics collection. Additionally, a new \ErrorMapper\ utility has been added to the OpenCensus module to allow mapping errors to trace statuses.
repository · high confidence
New OpenTracing example with Jaeger integration
The opentracing-example module has been rewritten to demonstrate distributed tracing using OpenTracing and Jaeger. It now includes a proxy and backend application structure, configurable via application.conf, and integrates a custom JaegerTracer layer that reports spans to a Jaeger collector endpoint.
opentracing-example · high confidence
New backend and proxy example applications with OpenTelemetry integration
The example application now includes two new entry points, BackendApp and ProxyApp, which demonstrate the library's capabilities. The backend service exposes a tick counter metric via ZIO metrics and integrates tracing, logging, baggage, and context propagation. The proxy service acts as an HTTP client to the backend, also utilizing tracing, logging, baggage, and context propagation, while using zio-http for client communication.
opentelemetry-example/src/main/scala/zio/telemetry/opentelemetry/example · high confidence
New context propagation and logging infrastructure for OpenTelemetry integration
This change introduces the foundational infrastructure for OpenTelemetry context propagation and structured logging within the ZIO telemetry library. It adds \ContextStorage\ to abstract context management, offering two implementations: \ZIOFiberRef\ for standard ZIO fiber-local context and \Native\ for thread-local context (required when using the OpenTelemetry Java instrumentation agent). It also provides \IncomingContextCarrier\ and \OutgoingContextCarrier\ to handle context data exchange with external processes via text maps. Additionally, a new \Logging\ module is added, which integrates ZIO's logging system with OpenTelemetry's \LoggerProvider\, allowing log records to automatically include OpenTelemetry context and severity mappings.
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/context · high confidence
OpenTelemetry example now supports metrics and logging alongside tracing
The OpenTelemetry example application has been expanded to include full observability support for metrics and logs, in addition to the existing tracing capabilities. New provider files (MeterProvider, LoggerProvider) and an updated OtelSdk configuration allow users to export metrics via OTLP JSON logging and logs via OTLP HTTP (with specific integrations for Seq and Fluent Bit), enabling a complete three-pillar telemetry setup within the example.
opentelemetry-example/src/main/scala/zio/telemetry/opentelemetry/example/otel · high confidence
Behavioural changes
New Tracing API with Unsafe accessors and Span Links
The \Tracing\ module introduces a refined API for managing OpenTelemetry spans in ZIO applications. To improve safety and clarity, methods for retrieving the current context, span context, and span now carry an \Unsafe\ suffix (\getCurrentContextUnsafe\, \getCurrentSpanContextUnsafe\, \getCurrentSpanUnsafe\), signaling that they do not manage span lifecycle. The API also adds support for \SpanLink\ via \extractSpan\ and \inSpan\, allowing users to link spans from different traces, and provides \extractSpanUnsafe\ for interoperability with external tracing systems where manual span finalization is required.
opentelemetry/src/main/scala/zio/telemetry/opentelemetry/tracing · high confidence
Test coverage
Added comprehensive tests for ZIO OpenTracing integration; Added test for Attributes apply method resolution; Added tests for OpenCensus tracing integration; Added tests for OpenTelemetry metrics integration; Added tests for ZIO OpenTelemetry baggage operations and log annotation integration; Added unit tests for ZIO OpenTelemetry tracing.
Dependencies
Initial project scaffolding with ZIO 2.1 and OpenTelemetry 1.66 dependencies
The build configuration has been established with SBT 1.13.0 and ZIO 2.1.26, alongside OpenTelemetry 1.66.0, OpenCensus 0.31.1, and Opentracing 0.33.0. The project defines modular dependency sets for core telemetry (OpenTelemetry, OpenCensus, Opentracing) and specific examples, including ZIO HTTP, Jaeger, and Zipkin. Binary compatibility is managed via sbt-mima, comparing against version 3.0.0-RC1 with exclusions for the main telemetry packages.
project · high confidence
Upgrade ZIO to 2.1.26 and update build infrastructure
The project's build configuration has been updated to use ZIO version 2.1.26, along with corresponding updates to the sbt ecosystem plugins (zio-sbt-ci, zio-sbt-ecosystem) and other dependencies like scala-library (2.13.18) and http4s components. This change also introduces new CI checks for binary compatibility (Mima) and dependency analysis (MissingLink, undeclared/unused dependencies), and adds a workaround for a webpack compatibility issue in the documentation build process.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 68.
Lenses
- Code Health 91
- Architecture 95
- Maturity 59
- Readiness 74
- Security 70
Changes since last survey
- 300 commits — 296 feature/other, 4 fixes
By area
- scala-cli/opentelemetry — 108 commits
- project/plugins.sbt — 76 commits
- project/build.properties — 33 commits
- (root) — 31 commits
- project/Dependencies.scala — 22 commits
- .github/workflows — 18 commits
- (repo) — 4 commits
- opentelemetry/src — 4 commits
- docs/opentelemetry-example.md — 1 commit
- docs/opentelemetry-zio-logging.md — 1 commit
- opentelemetry-zio-logging/src — 1 commit
- scala-cli/opentelemetry-zio-logging — 1 commit
Notable commits
- fix: Fix 'sbt not found' error in CI (#925)
- fix: Fix Attributes.apply methods resolution (#913)
- fix: build: update zio-sbt to 0.7.0 to fix broken Sonatype badges (#1228)
- fix: fix opentelemetry example (#835)
- change: Update scala cli scala version 3.x.x (#869)
- change: Allow direct access to trace and span id for zio-logging's LogFormat (#842)
- change: Bump actions/checkout from 4 to 5 (#1034)
- change: Bump coursier/cache-action from 6 to 7 (#1076)
- change: Bump hmarr/auto-approve-action from 3.2.1 to 4.0.0 (#1033)
- change: Configure Scala Steward and Dependabot && Remove Renovate (#1030)
- change: Expose histogram boundaries parameter in the public API method (#865)
- change: Fix typos and enhance formatting in docs (#868)
- change: Pass ZIO Metrics histogram boundaries to OTEL (#864)
- change: Remove Double.MaxValue histogram upper bound added by ZIO (#871)
- change: Remove sbt-bloop plugin (#1060)
- change: Replace deprecated ResourceAttributes with ServiceAttributes (#973)
- change: Update README.md (#844)
- change: Update izumi-reflect to 2.3.10 (#847)
- change: Update izumi-reflect to 2.3.9 (#836)
- change: Update izumi-reflect to 3.0.1 (#939)
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
zio/zio-telemetry was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b626709861d22d23ca44a0135309ad9bbdac787d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.