Skip to content

[Task] docs: Create distributed tracing deep dive guide #461

Description

@kcenon

Summary

Create a deep dive guide for distributed tracing covering context propagation, trace sampling, cross-service correlation, and integration with Jaeger/Zipkin/OTLP backends.

Parent Issue

Part of: [EPIC] docs: Address documentation gaps across all ecosystem systems (kcenon/common_system#325)

Background (Why)

monitoring_system includes distributed tracing at include/kcenon/monitoring/tracing/ with distributed_tracer.h and trace_context.h, plus trace exporters for Jaeger, Zipkin, OTLP, and Console. Only basic tracing is covered in QUICK_START.md.

Source files:

  • include/kcenon/monitoring/tracing/distributed_tracer.h — Tracer implementation
  • include/kcenon/monitoring/tracing/trace_context.h — Context propagation
  • include/kcenon/monitoring/exporters/trace_exporters.h — Jaeger, Zipkin, OTLP, Console

Scope (What)

Create docs/guides/DISTRIBUTED_TRACING.md covering:

1. Tracing Architecture

  • Span model (trace ID, span ID, parent span ID)
  • Context propagation (in-process, cross-process)
  • Sampling strategies (always, never, probabilistic, rate-limited)

2. Trace Context

  • How context propagates across threads
  • HTTP header propagation (W3C TraceContext, B3)
  • Context injection and extraction API

3. Creating Spans

  • Root spans vs child spans
  • Span attributes and events
  • Span status and error recording
  • Span timing and duration

4. Backend Integration

  • Jaeger setup and configuration
  • Zipkin setup and configuration
  • OTLP direct export
  • Console exporter for development

5. Cross-Service Tracing

  • Context propagation across network boundaries
  • Integration with network_system for automatic propagation
  • Correlation with logger_system log entries

6. Advanced Topics

  • Custom sampling strategies
  • Span enrichment and processing
  • Trace storage and querying
  • Performance impact and overhead

Acceptance Criteria

  • Tracing architecture fully explained
  • Context propagation patterns documented
  • All 4 trace exporters documented with setup
  • Cross-service tracing explained
  • At least 3 complete tracing examples

Metadata

Metadata

Assignees

Labels

area/networkNetwork monitoring featuresdocumentationImprovements or additions to documentationpriority/mediumMedium priority - Important but not urgent

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions