Microservice Observability

25 Aug 2026

[ development  design  coding  distributed  ]

Concepts

Trace

The full story of a single request. Made of many spans. Has a trace_id so all pieces stay linked.

Span

One timed step in that story (e.g., DB query, HTTP call, function). Starts, ends, and carries metadata.

Root Span

The first span (no parent). Usually the inbound HTTP request, queue message, or scheduled job trigger.

Child Span

A smaller step inside a bigger one. Lets you break work into clear pieces.

Context

The “current trace + active span” that rides along your async calls and network hops so new spans attach correctly.

Sampler

The rule that decides: keep (record/export) this trace or drop it to save cost/noise.

Exporter

The piece that ships finished spans to your backend (OneUptime, Jaeger, Tempo, etc.).

Metrics

The heartbeat of your application. They tell you what is happening, when it happened, and how often it occurs.

Spans

Guidelines

Common pitfalls:

Span Naming Best Practices

Events

Use events for:

Avoid events for:

Best practices:

Anti‑patterns:

Events vs spans vs logs (quick guide)

Common Anti-Patterns

Types of Metrics

Counter

UpDownCounter

Histogram

Gauge

Metrics vs Other Signals

Use Metrics When:

Use Traces When:

Use Logs When:

Reference