OpenTelemetry Integration

JAATO integrates OpenTelemetry tracing via a plugin-based architecture. A TelemetryPlugin protocol abstracts OTel operations, with a zero-cost NullTelemetryPlugin default and a full OTelPlugin implementation. The span hierarchy — jaato.turngen_ai.chatjaato.tooljaato.permission_check — provides end-to-end visibility into agentic turns, model calls, tool executions, and permission decisions.

OpenTelemetry Integration Infography
Click to open full-size image in a new tab

Span Hierarchy

Each agentic turn produces a tree of nested spans that capture the full execution flow:

SpanPurposeKey Attributes
jaato.turnTop-level turn orchestrationsession_id, agent_type, turn_index, streaming, cancelled
gen_ai.chatModel API call (GenAI semantic conventions)gen_ai.system, gen_ai.request.model, gen_ai.usage.*
jaato.toolIndividual tool executiontool.name, tool.plugin_type, tool.success, tool.duration_seconds
jaato.permission_checkPermission decisionpermission.tool, permission.decision, permission.scope
jaato.gcGarbage collectiongc.plugin, gc.tokens_freed, gc.trigger_reason

Design Principles

  • Zero-cost default — When telemetry is disabled, NullTelemetryPlugin provides no-op implementations with zero overhead
  • Plugin-based — The TelemetryPlugin protocol can be implemented by any backend, not just OpenTelemetry
  • Content redaction — Prompt and response content is redacted by default; opt-in via JAATO_TELEMETRY_CAPTURE_CONTENT=true
  • GenAI semantic conventions — Follows the emerging OpenTelemetry GenAI semantic conventions for model interaction spans

Configuration

VariableDefaultDescription
JAATO_TELEMETRY_ENABLEDfalseEnable OpenTelemetry tracing
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317OTLP collector endpoint
OTEL_SERVICE_NAMEjaatoService name in traces
JAATO_TELEMETRY_CAPTURE_CONTENTfalseInclude prompt/response content in spans

Thread Context Propagation

Parallel tool execution runs on a thread pool. The OTel plugin captures the parent span context before dispatching to threads and re-attaches it in each worker thread, ensuring tool spans are correctly parented under the jaato.turn span even during concurrent execution.

Back to Enterprise Overview