Observability¶
This component page maps the shared observability package and public source boundaries. It points to the code that owns telemetry configuration, context propagation, tracing/logging helpers, taxonomy constants, process telemetry identity, and optional OTLP export configuration.
Concept Model¶
Observability provides shared telemetry primitives while each long-lived process owns its service identity. The package is not a business contract store; it carries correlation and operation context into logs and spans so mission, task, worker, worker-private MCP operation, and attempt activity can be followed across orchestrator, worker-agent, worker-private LIFT2 MCP, and HTTP client boundaries.
The shipped model has three layers. Configuration chooses disabled, console, or OTLP-over-HTTP
trace export plus JSON or console log rendering. Business context binds low-cardinality IDs
to structlog context and span attributes. Taxonomy constants name stable business operations
such as mission planning, task dispatch, worker gateway execution, and mcp.* lifecycle
outcomes. Optional OTLP fan-in is deployment configuration, not a second telemetry authority.
No Jaeger, Tempo, or other trace backend is introduced as a current-state dependency.
Implementation Flow¶
At process startup, services call configure_observability with their service identity. The
bootstrap builds logging and tracing runtimes from environment-backed config, attaches
service resource attributes to the tracer provider, and returns helpers for instrumenting
FastAPI apps, Starlette apps, and owned HTTPX clients. Logging uses a shared fanout handler so
multiple runtimes in one test process can keep separate logger outputs while still adding log
level, business context, and trace/span IDs.
During request handling or worker execution, callers bind business context or set span business attributes with the shared key set. FastAPI, Starlette, and HTTPX instrumentation propagate W3C trace context across service calls: FastAPI covers orchestrator and worker-agent A2A surfaces, Starlette covers the worker-private LIFT2 MCP application, and HTTPX covers owned outbound clients. The worker MCP transport may observe SDK progress messages, but trace headers stay in HTTP metadata rather than MCP params, public DTOs, mission artifacts, Agent Cards, scheduler targets, or operator projections. Shutdown reverses instrumentation, flushes and shuts down the tracer provider, resets logging, and clears business context. Collector-backed behavior is configured through environment-backed OTLP settings; command syntax and deployment details stay in deploy/runbook sources.
Telemetry Propagation Diagram¶
This diagram shows the package-level propagation path. It is about correlation context and telemetry helpers, not business payload authority.
flowchart LR
Config["environment observability config"]
Bootstrap["configure_observability"]
Logging["structured logging"]
Tracing["tracing provider"]
FastAPI["FastAPI instrumentation"]
Starlette["Starlette instrumentation"]
HTTPX["HTTPX instrumentation"]
BusinessContext["business context keys"]
Orchestrator["orchestrator process"]
Worker["worker-agent process"]
Lift2["worker-private LIFT2 MCP process"]
Collector["optional OTLP collector"]
Config --> Bootstrap
Bootstrap --> Logging
Bootstrap --> Tracing
Bootstrap --> FastAPI
Bootstrap --> Starlette
Bootstrap --> HTTPX
BusinessContext --> Logging
BusinessContext --> Tracing
FastAPI --> Orchestrator
FastAPI --> Worker
Starlette --> Lift2
HTTPX -. "W3C trace context" .-> Orchestrator
HTTPX -. "W3C trace context" .-> Worker
HTTPX -. "W3C trace context" .-> Lift2
Tracing -. optional export .-> Collector
Responsibility¶
Provide shared observability primitives so each long-lived process owns its telemetry identity and propagates correlation context across service boundaries.
Owns¶
- Observability package source in
packages/observability/. - Environment-driven telemetry configuration for disabled, console, and OTLP-over-HTTP trace exporter modes.
- Structured logging helpers, trace/span helpers, FastAPI, Starlette, and HTTPX instrumentation helpers, and runtime shutdown cleanup.
- Business context propagation keys for mission, task, worker, worker-task, MCP operation, and attempt identifiers.
- Stable low-cardinality taxonomy constants for mission, task, worker, and
mcp.*lifecycle operations. - Optional OTLP export configuration through environment-backed settings.
Does Not Own¶
- Business DTO fields or persisted artifact schemas.
- Public DTO, mission artifact, Agent Card, scheduler, operator projection, or MCP domain payload fields for trace context.
- Service readiness or scheduling authority.
- Optional collector deployment commands.
- Jaeger, Tempo, or other trace backend storage.
- Deploy topology or runbook command syntax; those remain with deploy-owned docs.
Current Status¶
Shipped. packages/observability/ is the current shared telemetry helper authority. Services
own their own runtime identity and use this package for consistent logs, spans, context, and
W3C trace context propagation across the deterministic orchestrator-to-worker-agent-to-LIFT2-MCP
path.
Source Of Truth¶
Observability configuration, structured logging, tracing bootstrap, business context, and
taxonomy constants remain canonical in packages/observability/. Collector behavior is
documented here only as a source pointer.
Key Source Paths¶
| Path | Purpose |
|---|---|
packages/observability/ |
Package root for observability source. |
packages/observability/src/omega_observability/config.py |
Observability configuration, environment variable names, and exporter/renderer modes. |
packages/observability/src/omega_observability/context.py |
Business context binding and propagation keys. |
packages/observability/src/omega_observability/logging.py |
Structured logging configuration and trace/log correlation helper. |
packages/observability/src/omega_observability/tracing.py |
Tracer provider, service resource attributes, FastAPI, Starlette, and HTTPX instrumentation, and span business attributes. |
packages/observability/src/omega_observability/bootstrap.py |
Runtime bootstrap/shutdown wrapper for logging and tracing instrumentation. |
packages/observability/src/omega_observability/taxonomy.py |
Low-cardinality business operation taxonomy constants. |
apps/worker_agent/src/omega_worker_agent/mcp/http_transport.py |
Worker-owned private MCP HTTPX client instrumentation and progress handling boundary. |
external/lerobot_lab/deploy/lift2/omega_runtime/app.py |
Worker-private LIFT2 MCP Starlette app instrumentation and telemetry identity. |
Source Authority¶
Observability behavior is owned by the package and deploy source paths above. Use them for telemetry ownership, trace/log propagation, service identity, and optional collector topology context.
Related Pages¶
docs/design/observability-model.mddocs/components/worker-agent.md