Skip to content

[OTEL] Improve local debugging flow with otel integration - #2882

Draft
George Ng (GeorgeNgMsft) wants to merge 1 commit into
mainfrom
dev/georgeng/otel_debug_flow
Draft

[OTEL] Improve local debugging flow with otel integration#2882
George Ng (GeorgeNgMsft) wants to merge 1 commit into
mainfrom
dev/georgeng/otel_debug_flow

Conversation

@GeorgeNgMsft

@GeorgeNgMsft George Ng (GeorgeNgMsft) commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Improves TypeAgent’s local OTEL output into a privacy-safe, end-to-end execution narrative, allowing developers and on-call engineers to follow a request from agent-server ingress through queueing, translation, LLM/reasoning work, action execution, and the final response.

  • Adds correlated server, queue, request, translation, reasoning, action, LLM, and completion lifecycle events.
  • Adds central instrumentation for standard and streaming chat-model calls, including provider/model, duration, status, cancellation, and token usage without prompt or response content.
  • Propagates stable request and trace identifiers across dispatcher, action, and model boundaries.
  • Keeps structured logs focused on operational facts while retaining payload-rich diagnostics under opt-in  debug  namespaces.
  • Removes redundant queue debug output and the legacy payload-bearing translation event.
  • Routes natural-language  log  actions through shared controls without command recursion or dependency cycles.
  • Passes complexity, lint, circular-dependency, formatting, build, and targeted test validation.

Rationale

Structured events represent the stable facts needed to reconstruct execution and identify where a failure occurred. Debug logs remain appropriate for detailed actions, schemas, model errors, results, and other implementation data that would make the default JSONL noisy or expose payloads.

A model event appears only when a model is actually called; grammar, cache, construction, and user-selected translations instead expose their strategy on  translation:completed . Server and queue events carry an explicit request ID because they occur outside the request root span, while downstream events inherit both request and trace correlation. Streaming spans remain active until iteration ends and distinguish success, provider failure, early termination, and cancellation.

@GeorgeNgMsft George Ng (GeorgeNgMsft) changed the title Improve debugging experience leveraging OTEL log exporting and adding… [OTEL] Improve local debugging flow with otel integration Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant