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
- #1 ai_agent emits the gen_ai client instruments under their semconv OTLP names when the switch is on
- #2 The un-mangled names are reconciled against signals/genai.md rather than re-derived independently
- #3 app emits its blueprint-declared custom instruments as OTLP with correct instrument kinds and units
- #4 Both lanes are nil unless declared; the promrw lanes are byte-unchanged when the switch is off
- #5 signals/otlp-metrics.md covers every added family with provenance and date
- #6 Neither workload imports the OTel SDK; the isolation test passes
Definition of Done
- #1 make gate (build vet test race rw-proto-check spdx-check forbidden-words)
- #2 make blueprint-schema (only if a blueprint field or construct/workload config struct changed)
- #3 DRY_RUN=true go run ./cmd/synthkit -once -dump — inventory diffed against signals/
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.