Version: v1.2.3 | Status: Active | Last Updated: March 2026
The telemetry module provides a unified observability framework based on the OpenTelemetry standard. It allows the system to record, correlate, and analyze the performance and behavior of distributed workflows.
- Adheres to OpenTelemetry (OTLP) specifications.
- Supports standard span attributes (HTTP status, error codes, component names).
- Enables propagation of trace context across process and network boundaries.
- Supports parent-child span nesting for recursive workflows (e.g., agent task decomposition).
- Supports recording and aggregating performance metrics (Counters, Gauges, Histograms).
- Provides a centralized dashboard for real-time system visibility.
- Creation and termination of spans with millisecond precision.
- Attachment of semantic attributes and events to spans.
- Automatic span status propagation (OK, ERROR, UNSET).
- Support for
W3C Trace Parentheaders. - Thread-safe and async-aware local context management.
- OTLP/HTTP and OTLP/gRPC support (where dependencies allow).
- Buffering and batching of span data for high-throughput scenarios.
- Support for standard metric instruments: Counter, UpDownCounter, Gauge, Histogram.
- Time-series aggregation and periodic export.
- Dimensionality support through metric attributes.
- Real-time visualization of traces and metrics.
- Sub-second updates for critical system health indicators.
- Correlated view of logs, traces, and metrics.
start_span(name: str, parent: Optional[Span]) -> Spantraced(name: str, attributes: dict): Decorator interface.link_span(span: Span, target: Span): Context linking.get_current_span() -> Optional[Span]
create_counter(name: str) -> Countercreate_gauge(name: str) -> Gaugecreate_histogram(name: str) -> Histogramrecord_metric(name: str, value: float, attributes: dict)
start_dashboard_server(port: int)register_view(metric_name: str, chart_type: str)update_display()
- Comprehensive unit tests for context propagation.
- Benchmarking of span start/end overhead.
- ≥80% test coverage.
- Human Documentation: README.md
- Technical Documentation: AGENTS.md
- Repository Root: ../../../README.md
import codomyrmex.telemetry