Skip to content

PacktPublishing/Mastering-Distributed-Observability-in-Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastering Distributed Observability in Rust, First Edition

This is the code repository for Mastering Distributed Observability in Rust, First Edition, published by Packt.

Implement OpenTelemetry in a real-world, multi-container e-commerce architecture

Manjunath Gangappa, Rajkumar Rangaraj

      Free PDF       Graphic Bundle       Amazon      

About the book

Mastering Distributed Observability in Rust, First Edition

Gain the skills to build, monitor, and debug distributed systems in Rust with this hands-on guide to observability using OpenTelemetry. As Rust adoption grows in backend services, developers face fragmented documentation and limited tooling for telemetry. This book fills that gap by presenting a unified, end-to-end solution to implement distributed observability in modern Rust systems.

You’ll explore the foundations of observability and Rust’s ownership model before learning how to collect, export, and correlate logs, metrics, and traces. Discover how to instrument applications using OpenTelemetry crates and bridge them with the tracing ecosystem. Learn to deploy the OpenTelemetry Collector, integrate with Prometheus, Grafana, and Jaeger, and tackle challenges like sampling, context propagation, and async tracing.

Written by two seasoned engineers with over 35 years of combined experience in large-scale systems and open-source observability leadership, this book balances theory with real-world implementations. From debugging async bottlenecks to configuring cost-effective telemetry pipelines, you’ll finish with the confidence to operate reliable, observable Rust systems at scale.

Key Learnings

  • Understand the three pillars of observability in Rust
  • Apply tracing and logging using the Tokio and OpenTelemetry crates
  • Export telemetry to backends like Prometheus, Jaeger, and Grafana
  • Use the OpenTelemetry Collector to manage telemetry pipelines
  • Correlate metrics, logs, and traces for faster debugging
  • Implement structured logging, redaction, and context propagation
  • Optimize telemetry costs with sampling strategies
  • Build and deploy an observability-first Rust microservice

Chapters

Unity Cookbook, Fifth Edition
  1. Introduction to Observability
  2. Reading Rust Memory from Traces
  3. The OpenTel E-Commerce System
  4. Instrumenting the Request Journey
  5. Data Layer Instrumentation
  6. Metrics That Matter (RED + USE + KPIs)
  7. Log Strategy Without Log Hell
  8. Business Intelligence Views From Telemetry
  9. Finding Bottlenecks with Flamegraphs
  10. Async Bottlenecks and Runtime Saturation
  11. Database Bottlenecks
  12. Debugging Production Incidents
  13. Detecting Attacks in Traces
  14. Observability for AI-Augmented Services

Requirements for this book

The sample project, OpenTel E-Commerce, runs entirely on your local machine through Docker Compose. To follow along, you will need the following installed:
  • Rust 1.8 or later, installed through rustup, with Cargo
  • Docker and Docker Compose, used to run PostgreSQL and the telemetry backends
  • Git, for cloning the sample repository
  • A code editor with Rust support, such as VS Code with rust-analyzer, or RustRover
  • A terminal that supports Unix-style commands, which means WSL2 is recommended on Windows

Get to know Authors

Manjunath Gangappa Manjunath Gangappa is a Director of Software Engineering at Mastercard R&D, with over 19 years of experience in enterprise software. He brings more than six years of hands-on Rust development along with extensive experience in the Java ecosystem, UI development (JavaScript), database design, and large-scale system architecture. At Mastercard, he drives the development of cross-border payment platforms that incorporate blockchain technology, blending deep technical expertise with practical leadership. Having implemented observability in mission-critical financial systems, he offers firsthand insight into why telemetry spanning tracing, metrics, and logging is indispensable for ensuring reliability, security, and trust in modern FinTech.

Rajkumar Rangaraj Rajkumar Rangaraj is a Principal Software Engineer at Microsoft with 19 years of experience in designing and building large-scale distributed systems and developer platforms. As a long-standing maintainer and contributor in the OpenTelemetry project, he plays an active role in shaping the future of observability across the industry. His work spans defining cross-language instrumentation strategies, architecting telemetry pipelines, and driving the adoption of open standards at scale. Rajkumar has authored migration strategies and technical specifications that help organizations transition from legacy monitoring approaches to modern, standards-based solutions. His unique perspective—bridging open-source leadership with enterprise-scale experience—positions him as both a practitioner and an architect of the next generation of observability.

Other Related Books

About

Distributed Observability For Rust Developers, by Packt Publishing

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages