Observability Engineering - Achieving Production Excellence

My personal notes on the book Observability Engineering: Achieving Production Excellence.

Chapter 1: What is Observability?

Observability = understanding a system’s internal state by examining its external outputs. If you can understand any bizarre or novel state without needing to ship new code, you have observability.

Key differences from monitoring:

The Three Pillars (Legacy Model)

Problem with pillars: Each addresses a specific question type, requiring context-switching between tools. Not sufficient for modern complexity.

Modern Observability Requirements

Core principle: Instrument once, ask any question later.

Chapter 2: Debugging Pre- vs Post-Production

Pre-Production Debugging

Post-Production Debugging

Key insight: Traditional debugging tools (debuggers, profilers) don’t work in production. Need observability to understand system state without disrupting it.

The Production Debugging Loop

  1. Notice problem (alert, user report)
  2. Form hypothesis
  3. Query telemetry data
  4. Refine hypothesis
  5. Repeat until root cause found

Speed matters: The faster you can iterate through this loop, the faster you resolve incidents.

Chapter 3: Lessons from Scaling Without Observability

Common Anti-Patterns

Metrics overload: Creating metrics for everything results in:

Alert fatigue: Too many alerts lead to:

Dashboard proliferation:

What Doesn’t Scale

Key Lesson

Without observability, debugging time increases exponentially with system complexity.

Chapter 4: Observability, DevOps, SRE, and Cloud Native

DevOps Connection

Observability enables key DevOps practices:

SRE Principles

Observability supports SRE tenets:

Cloud Native Requirements

Modern architectures demand observability:

Reality: You can’t SSH into production anymore. Need to understand systems from the outside.

Chapter 5: Observability in the Software Life Cycle

Where Observability Fits

Development:

Testing:

Deployment:

Production:

Key insight: Observability isn’t just for production - use it throughout the entire lifecycle for faster feedback.

Chapter 6: Observability-Driven Development

The Practice

Write instrumentation before or alongside application code, not as an afterthought.

Benefits

What to Instrument

Anti-Pattern

Don’t just instrument technical metrics (CPU, memory). Instrument business value and user experience.

Chapter 7: Understanding Cardinality

Definition

Cardinality = number of unique values in a dimension.

Examples:

Why It Matters

High-cardinality data is essential for observability because:

The Problem

Traditional metrics systems can’t handle high cardinality:

The Solution

Use structured events instead of metrics:

Key equation:

Cardinality = dimension1_values × ... × dimensionN_values

With 10 dimensions of 100 values each = 100^10 possible combinations!

Chapter 8: Structured Events as Building Blocks

Example structure:

{
  "timestamp": "2024-01-15T10:30:45Z",
  "duration_ms": 234,
  "user_id": "user_12345",
  "endpoint": "/api/checkout",
  "status_code": 200,
  "item_count": 3,
  "total_amount": 89.99,
  "payment_method": "credit_card",
  "region": "us-west",
  "version": "v2.3.1"
}

Advantages Over Metrics/Logs

vs Metrics:

vs Logs:

Best Practices

Traces

Chapter 9: How Instrumentation Works

Instrumentation Approaches

1. Manual Instrumentation

2. Auto-Instrumentation

3. Hybrid

What to Capture

Technical telemetry:

Business telemetry:

Context propagation:

Sampling Strategies

Head-based sampling: Decide at request start

Tail-based sampling: Decide after request completes

Dynamic sampling: Adjust based on load/value

Chapter 10: Instrumentation with OpenTelemetry

Chapter 11: Analyzing Events for Observability

The Debugging Workflow

1. Start broad:

2. Iteratively narrow:

3. Find outliers:

4. Form and test hypotheses:

Essential Query Patterns

Filtering:

Grouping:

Statistical analysis:

Comparison:

Advanced Techniques

BubbleUp: Automatically finds dimensions that differ between two groups

High-Cardinality Exploration:

Trace Analysis:

Key Principles

Think in dimensions, not dashboards:

Keep context:

Iterate quickly:

Chatper 12: Using Service-Level Objectives for Reliability

13. Acting on and Debugging SLO-Based Alerts


Key Takeaways

  1. Observability ≠ Monitoring: Observability answers unknown questions; monitoring answers known ones
  2. High cardinality is essential: Must support arbitrary dimensions for modern debugging
  3. Structured events > Metrics + Logs: Rich, wide events provide necessary context
  4. Instrument early: Add observability during development, not as afterthought
  5. OpenTelemetry: Use standards for portability and future-proofing
  6. Explore iteratively: Debug by following the data, not predefined dashboards
  7. Speed matters: Faster debugging loops = faster incident resolution = better user experience