Learning OpenTelemetry

Book description

OpenTelemetry is a revolution in observability data. Instead of running multiple uncoordinated pipelines, OpenTelemetry provides users with a single integrated stream of data, providing multiple sources of high-quality telemetry data: tracing, metrics, logs, RUM, eBPF, and more. This practical guide shows you how to set up, operate, and troubleshoot the OpenTelemetry observability system.

Authors Austin Parker, head of developer relations at Lightstep and OpenTelemetry Community Maintainer, and Ted Young, cofounder of the OpenTelemetry project, cover every OpenTelemetry component, as well as observability best practices for many popular cloud, platform, and data services such as Kubernetes and AWS Lambda. You'll learn how OpenTelemetry enables OSS libraries and services to provide their own native instrumentation—a first in the industry.

Ideal for application developers, OSS maintainers, operators and infrastructure teams, and managers and team leaders, this book guides you through:

  • The principles of modern observability
  • All OpenTelemetry components—and how they fit together
  • A practical approach to instrumenting platforms and applications
  • Methods for installing, operating, and troubleshooting an OpenTelemetry-based observability solution
  • Ways to roll out and maintain end-to-end observability across a large organization
  • How to write and maintain consistent, high-quality instrumentation without a lot of work

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
  2. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. Acknowledgments
      1. Austin
      2. Ted
  3. 1. The State of Modern Observability
    1. The Times They Are A-Changin’
    2. Observability: Key Terms to Know
    3. A Brief History of Telemetry
    4. The Three Browser Tabs of Observability
    5. Emerging Complications
    6. The Three Pillars Were an Accident
    7. A Single Braid of Data
    8. Conclusion
  4. 2. Why Use OpenTelemetry?
    1. Production Monitoring: The Status Quo
    2. The Challenges of Production Debugging
    3. The Importance of Telemetry
      1. Hard and Soft Context
      2. Telemetry Layering
      3. Semantic Telemetry
    4. What Do People Need?
      1. Developers and Operators
      2. Teams and Organizations
    5. Why Use OpenTelemetry?
      1. Universal Standards
      2. Correlated Data
    6. Conclusion
  5. 3. OpenTelemetry Overview
    1. Primary Observability Signals
      1. Traces
      2. Metrics
      3. Logs
    2. Observability Context
      1. The Context Layer
      2. Attributes and Resources
      3. Semantic Conventions
    3. OpenTelemetry Protocol
    4. Compatibility and Future-Proofing
    5. Conclusion
  6. 4. The OpenTelemetry Architecture
    1. Application Telemetry
      1. Library Instrumentation
      2. The OpenTelemetry API
      3. The OpenTelemetry SDK
    2. Infrastructure Telemetry
    3. Telemetry Pipelines
    4. What’s Not Included in OpenTelemetry
    5. Hands-On with the OpenTelemetry Demo
      1. Running the Demo
      2. Architecture and Design
      3. Managing Application Performance with OpenTelemetry
      4. Finding Needles in Haystacks
      5. Observability Pipelines in the Demo
    6. The New Observability Model
    7. Conclusion
  7. 5. Instrumenting Applications
    1. Agents and Automated Setup
      1. Installing the SDK
      2. Registering Providers
    2. Providers
      1. TracerProvider
      2. MeterProvider
      3. LoggerProvider
      4. Shutting Down Providers
      5. Custom Providers
    3. Configuration Best Practices
      1. Remote Configuration
    4. Attaching Resources
      1. Resource Detectors
      2. Service Resources
    5. Installing Instrumentation
      1. Instrumenting Application Code
      2. How Much Is Too Much?
      3. Layering Spans and Metrics
      4. Browser and Mobile Clients
    6. The Complete Setup Checklist
    7. Packaging It All Up
    8. Conclusion
  8. 6. Instrumenting Libraries
    1. The Importance of Libraries
      1. Why Provide Native Instrumentation?
      2. Observability Works by Default in Native Instrumentation
      3. Native Instrumentation Lets You Communicate with Your Users
      4. Native Instrumentation Shows That You Care About Performance
    2. Why Aren’t Libraries Already Instrumented?
    3. How OpenTelemetry Is Designed to Support Libraries
      1. OpenTelemetry Separates the Instrumentation API and the Implementation
      2. OTel Maintains Backward Compatibility
      3. OTel Keeps Instrumentation Off by Default
    4. Shared Libraries Checklist
    5. Shared Services Checklist
    6. Conclusion
  9. 7. Observing Infrastructure
    1. What Is Infrastructure Observability?
    2. Observing Cloud Providers
      1. Collecting Cloud Metrics and Logs
      2. Metamonitoring
      3. Collectors in Containers
    3. Observing Platforms
      1. Kubernetes Platforms
      2. Serverless Platforms
      3. Queues, Service Buses, and Other Async Workflows
    4. Conclusion
  10. 8. Designing Telemetry Pipelines
    1. Common Topologies
      1. No Collector
      2. Local Collector
      3. Collector Pools
    2. Pipeline Operations
      1. Filtering and Sampling
    3. Transforming, Scrubbing, and Versioning
      1. Transforming Telemetry with OTTL
      2. Privacy and Regional Regulations
      3. Buffering and Backpressure
      4. Changing Protocols
    4. Collector Security
    5. Kubernetes
    6. Managing Telemetry Costs
    7. Conclusion
  11. 9. Rolling Out Observability
    1. The Three Axes of Observability
      1. Deep Versus Wide
      2. Code Versus Collection
      3. Centralized Versus Decentralized
    2. Moving from Innovation to Differentiation
      1. Observability as Testing
      2. Green Observability
      3. AI Observability
    3. OpenTelemetry Rollout Checklist
    4. Conclusion
  12. A. The OpenTelemetry Project
    1. Organizational Structure
      1. The OpenTelemetry Specification
      2. Project Management
    2. How to Get Involved
    3. Where to Find Us
  13. B. Further Resources
    1. Websites
    2. Books
  14. Index
  15. About the Authors

Product information

  • Title: Learning OpenTelemetry
  • Author(s): Ted Young, Austin Parker
  • Release date: March 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098147181