feat(telemetry): #407 T6 oRPC spans and shared metrics#568
Conversation
T6 Slice Implementation SummaryBranch: Scope implemented:
Gate evidence:
Notes:
|
|
@openhands-agent model=openrouter/qwen/qwen3.7-max provider=openrouter output=pr-comment iterations=800 use harness IMPL-EVAL — TEL-T6 oRPC/CLIENT spans + ai TelemetryPort + workers metrics (issue #407, PR #568)You are the IMPL-EVAL evaluator (separate session from the Tier-D generator) for one slice of the SKILL
DECISIVE CHECKS — in order; POST verdict after check 4
Rules
OUTPUT CONTRACT (mandatory — verdict first)
|
OpenHands Agent — CompletedOPENHANDS_VERDICT: PASS Model: IMPL-EVAL Verdict: PASSPhase: IMPL-EVAL SummaryThis evaluation assessed PR #568 implementing T6 oRPC/CLIENT spans and ai TelemetryPort injection with workers metrics sharing. All four decisive checks pass. Changes Reviewed
Decisive ChecksCheck 1: SERVER + CLIENT Spans, Correctly Parented — PASS ✓Core adversarial check on span kind and W3C propagation.
Evidence: Line 257 shows Check 2: ai TelemetryPort is Adapter-Injected — PASS ✓Confirm packages/ai uses port pattern, not ad-hoc tracer.
Evidence: Port contract defined in Check 3: Workers Metrics Shared (TC-11) — PASS ✓Confirm workers metrics come from shared telemetry layer.
Evidence: No private metric construction in plugins/workers, only consumption of shared instruments. Check 4: Gates + Hygiene — PASS ✓Reproduce via scoped wrappers for all touched packages.
Evidence: All gate commands exit 0, no new casts, no lock file changes. Check 5 (Optional): No Cross-Lane Regression to T3/T4 — PASS ✓Confirm T6 work doesn't regress T3 or T4 telemetry core.
Evidence: T3/T4 modules unchanged in this slice, no regression surface. ValidationAll validation performed via direct command execution: # Type check touched roots
deno check packages/telemetry/src/orpc/tracing-plugin.ts \
packages/telemetry/src/instrumentation/worker.ts \
packages/sdk/src/client/http-client-link.ts \
packages/ai/src/agent/loop.ts
# exit 0
# Lint touched files
deno lint packages/telemetry/src/orpc \
packages/telemetry/src/instrumentation/worker.ts \
packages/sdk/src/client/http-client-link.ts \
packages/ai/src/agent/loop.ts \
plugins/workers/worker/job-dispatcher.ts
# exit 0 (10 files, 0 diagnostics)
# Format check
deno fmt --check packages/telemetry/src/orpc \
packages/telemetry/src/instrumentation/worker.ts \
packages/sdk/src/client/http-client-link.ts \
packages/ai/src/agent/loop.ts \
plugins/workers/worker/job-dispatcher.ts
# exit 0
# Focused tests
deno test packages/telemetry/tests/orpc/plugin_test.ts \
packages/ai/tests/agent_loop_test.ts
# 12 passed / 0 failed
# Publish dry-run
deno publish --dry-run
# exit 0
# Lock file hygiene
git diff c8f68721..HEAD -- deno.lock
# EMPTY
# Cast analysis
git diff c8f68721..HEAD -- packages/sdk/src/client/http-client-link.ts | grep -E "^[-+].* as "
# Shows relocated cast only, no new castsRemaining RisksNone. All decisive checks pass, all gates green, no cross-lane regression, no hygiene violations. VerdictPASS Note: This evaluation is read-only. The evaluator does NOT mutate the repository. The generator session may proceed with confidence that T6 implementation meets all acceptance criteria. Run: https://github.com/rickylabs/netscript/actions/runs/28903905650 |
|
[PHASE: IMPL-EVAL] [VERDICT: PASS] Slice Check 1 — SERVER + CLIENT spans, correctly parented (core; ADVERSARIAL). PASS. Check 2 — ai TelemetryPort is adapter-injected. PASS. Check 3 — workers metrics shared (TC-11). PASS. Check 4 — Gates + hygiene. PASS.
Optional — Check 5: no cross-lane regression to T3/T4 telemetry core. PASS from observed surface. The diff touches OPENHANDS_VERDICT: PASS |
|
|
[PHASE: IMPL] [VERDICT: REWORK_COMPLETE] T6 oRPC tracing rework is pushed. Summary
Dependency
Commit
Gate Evidence
Acceptance Preservation
No dashboard files touched. No force-push used; remote branch was advanced with explicit refspec |
|
@openhands-agent model=openrouter/qwen/qwen3.7-max output=pr-comment iterations=800 use harness IMPL-EVAL — PR #568 / issue #407 (TEL-T6 oRPC span-creation rework to first-party
|
OpenHands Agent — CompletedOPENHANDS_VERDICT: PASS Model: IMPL-EVAL Summary — PR #568 / T6 oRPC Instrumentation ReworkVerdictPASS — All gates passed. The T6 instrumentation rework correctly delegates span lifecycle to Evaluation ScopeEvaluated PR #568 (feat(telemetry): #407 T6 oRPC spans and shared metrics) which reworked the oRPC OpenTelemetry instrumentation to use first-party Changes Assessed
Validation EvidenceType Safety Gates
Functional Validation
Publish Bar
Code Quality
Dependency Hygiene
Wrap-Don't-Reinvent (WDR) ResolutionOriginal drift: The T6 implementation hand-rolled span creation via Rework verification:
The WDR first-party drift is resolved. Prior T6 Acceptance Preserved
Scope Compliance
Remaining RisksNone identified. All acceptance criteria met, all gates passed, no regressions detected. RecommendationAPPROVE — The rework fully resolves the WDR violation while preserving all T6 instrumentation capabilities. The implementation is clean, tested, and publishable. OPENHANDS_VERDICT: PASS Run: https://github.com/rickylabs/netscript/actions/runs/28932868281 |
|
[PHASE: IMPL-EVAL] [VERDICT: PASS] IMPL-EVAL Verdict — PR #568 / T6 oRPC Instrumentation ReworkEvidence SummaryType Safety Gates
Functional Validation
Publish Bar
Code Quality
Lock Hygiene
Wrap-Don't-Reinvent (WDR) First-Party Drift ResolutionThe original T6 implementation violated Operating Rule 3 by hand-rolling span creation via Rework Verification
The WDR first-party drift is resolved. The telemetry package now wraps Prior T6 Acceptance Preserved
Scope Compliance
VerdictAll gates passed. The T6 instrumentation rework correctly delegates span lifecycle to OPENHANDS_VERDICT: PASS |
Tier-A supervisor sign-off — T6 rework GREEN, merge-readyA1 slice review: PASS. The WDR major drift is resolved. CI: all green (scaffold-runtime, scaffold-static, check-test, close-gate, quality, deps) — This PR is merge-ready and is part of the beta.6 telemetry batch (with the already-merged |
Tier-A supervisor sign-off (beta6-ship orchestrator, session
|
Summary
Lands T6 for the telemetry revamp: oRPC now creates real SERVER spans through
@netscript/telemetry, SDK service clients create CLIENT spans and inject W3Cheaders, the AI agent loop records through an injected
TelemetryPort, andworkers emit shared telemetry metrics.
Closes #407
Part of #399.
Scope
packages/telemetry: oRPC SERVER spans and shared worker metric instruments.packages/sdk: outbound oRPC CLIENT spans plus W3C context injection.packages/ai: per-run and per-turn telemetry through package-ownedTelemetryPort.plugins/workers: worker dispatcher emits metrics through shared telemetry instrumentation..llm/runs/beta6-nondash--supervisor/.Acceptance
deno test --allow-env packages/telemetry/tests/orpc/plugin_test.ts packages/telemetry/tests/testing/in-memory-span-recorder_test.tsexit 0; 6 passed.deno test --allow-all packages/sdk/tests/integration/service-client-runtime_test.ts packages/sdk/tests/integration/workers-trigger-rpc_test.tsexit 0; 5 passed.packages/airecords through an injectedTelemetryPort; no ad-hoc tracer import. Evidence:deno test --allow-all packages/ai/tests/agent_loop_test.ts packages/ai/tests/runtime_test.tsexit 0; 15 passed.recordSharedWorkerMetricsin@netscript/telemetryplusdeno test --allow-all plugins/workers/worker/job-dispatcher_test.tsexit 0; 3 passed.rpc.serveris SERVER,rpc.clientis CLIENT, upstream semconv attributes stay inrpc.*/gen_ai.*/server.*, and NetScript-owned attributes stay innetscript.*.Gate Evidence
deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/telemetry --ext ts,tsxexit 0;filesSelected=83,failedBatches=0,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/sdk --ext ts,tsxexit 0;filesSelected=56,failedBatches=0,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/ai --ext ts,tsxexit 0;filesSelected=77,failedBatches=0,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root plugins/workers --ext ts,tsxexit 0;filesSelected=90,failedBatches=0,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/telemetry --ext ts,tsxexit 0;filesSelected=83,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/sdk --ext ts,tsxexit 0;filesSelected=56,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root packages/ai --ext ts,tsxexit 0;filesSelected=77,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-lint.ts --root plugins/workers --ext ts,tsxexit 0;filesSelected=90,totalOccurrences=0.deno run --allow-read --allow-run .llm/tools/run-deno-fmt.ts --root packages/telemetry --root packages/sdk --root packages/ai --root plugins/workers --ext ts,tsxexit 0;filesSelected=306,failedBatches=0,findings=0.deno task doc:lint --root packages/telemetry --prettyexit 0;combinedTotal=0.deno task doc:lint --root packages/sdk --prettyexit 0;combinedTotal=0.deno task doc:lint --root packages/ai --prettyexit 0;combinedTotal=0.deno task doc:lint --root plugins/workers --prettyexit 0;combinedTotal=14existing private type refs outside this slice's changed worker dispatcher.deno publish --dry-run --allow-dirtyfrompackages/telemetryexit 0; no--allow-slow-types.deno publish --dry-run --allow-dirtyfrompackages/sdkexit 0; no--allow-slow-types.deno publish --dry-run --allow-dirtyfrompackages/aiexit 0; no--allow-slow-types; existing dynamic import warnings in MCP adapter.deno publish --dry-run --allow-dirtyfromplugins/workersexit 0; no--allow-slow-types; existing dynamic import warnings.Notes
5f357ab3.deno.lockchurn occurred during Deno resolution and was reverted before commit.deno task e2e:cliwas not run; Flow-B full scaffold runtime E2E is T8 ([telemetry T8] Real (non-mocked) grouped-trace e2e — Flow B (epic merge-gate) #409)'s gate.