Task · SKT-0007.05

Emit app and ai_agent OTel-native

Description

The two workloads whose OTel-side names are already known in-repo, making this the lowest-risk emission wave in the epic.

signals/genai.md states that the gen_ai_client_* promrw families ARE the OTLP-to-Prometheus translation of gen_ai semconv instruments (. becomes _, unit s becomes _seconds, annotation units such as {token} dropped), validated against the OpenTelemetry semantic conventions and a live capture. So the OTLP names are recoverable by INVERTING A DOCUMENTED TRANSLATION rather than by guessing — which is what separates this from the kinds blocked on a capture.

app custom DSL instruments are SDK instruments, so their OTLP form is the blueprint-declared names unchanged.

Both take an opt-in otel.metrics switch mirroring web_service.

Acceptance Criteria

Definition of Done

Implementation Plan

Lane E: implement opt-in native OTLP metrics only for the app and ai_agent instruments already verdicted OTEL-NATIVE, reconcile names to the in-repo documented translation, and prove nil/off-path byte parity plus architecture isolation. Return provenance and any root-owned wiring requests.

Implementation Notes

Lane E dispatch preflight: EXECUTION route requested as gpt-5.6-luna/max with fork_turns=none; Delegation forbidden. Lane A code base 25e8c040 is exact-SHA green including e2e and ci-success.

Final verification: focused app and ai_agent native-OTLP tests passed, including opt-in/off-path parity, declared kinds/units and nil behavior. signals/otlp-metrics.md records the added families and provenance. Architecture isolation passed within make gate. make blueprint-schema regenerated cleanly; the complete 28-blueprint dry-run inventory loaded and reported 2646 distinct metric names with logs, traces and sigil present; make e2e passed at 650 received/650 expected; make gate passed.

Exact implementation SHA 1729e2068321fc53b6d973a6fc981fc1066c4c42 passed GitHub ci run 33186760476, including signal-fidelity, go, docker, hygiene, helm, ui, secret-scan, e2e and ci-success.

Final Summary

Added opt-in native OTLP metrics for app-declared SDK instruments and documented ai_agent semantic-convention histograms, with provenance, off-path parity and architecture isolation verified by focused tests, complete inventory, e2e and make gate.

View the source file on GitHub