Add required log+metric+span instrumentation wrapper #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a small instrumentation wrapper so code paths that matter emit all three observability signals together: structured log event, Prometheus metric, and OpenTelemetry span/attributes.
Context from director surface:
app/obs.py, with call sites spread acrossapp/main.py,app/queue.py,app/resilience.py, andapp/analysis.py.dispatch.context_truncated, incrementsllm_context_truncated_total, and sets span attributes.llm_truncation_avoided_totaland updates prompt-token metrics. It does not emit a structured log or span event.Goal:
Acceptance criteria:
llm_truncation_avoided_total, and annotates/adds an OTel span event when a current span exists. Include useful fields such as logical model, original token count, final token count, budget/target window, and dropped message count.prompt_tokens_sent,prompt_eval_count,target_num_ctx,num_parallel, backend, outcome).docs/FEATURES.mdordocs/proxy.mdif the user-facing observability behavior materially changes.ward exec test,uv run ruff check .,uv run black --check .,uv run mypy app,ward exec smoke, andward exec boot-probe.Notes:
WARD-RESERVATION: held 🔒
reservation details
Holder: container
engineer-codex-agent-proxy-37on hostkais-macbook-pro-2.local.Reserved by
ward agent --harness codex(reserved 2026-07-09T18:03:01Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL).--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/agent-proxy#37· branchissue-37· harnesscodex· workflowdirect-to-mainengineer-codex-agent-proxy-37· wardv0.504.0· dispatched2026-07-09T18:03:01ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.504.0).
— Codex, via
ward agentWARD-OUTCOME: done ✅
details
review gate skipped by
~/.ward/config.yamldefault.workflow: direct-to-main; review summary: skipped by
~/.ward/config.yamldefaultfelt: steady after the wrapper shape settled.
confidence: high.
surprises:
ward exec boot-probepruned dev deps, so black and mypy had to be rerun after resyncing.follow-ups: none.