feat: optional session IDs in OTEL token metrics #10
Loading…
Reference in a new issue
No description provided.
Delete branch "calcifer/hermes-otel-usage:feat/session-id-toggle"
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?
Summary
plugins.entries.otel_usage.include_session_id(default false) and optionalsession_id=API parameter.session.idonly for explicitly supplied nonempty identities; keep legacy/account routing, factors and request deduplication unchanged.Verification
Companion and deployment
Core PR: HoroTW/hermes-agent#27
Both changes are prepared only. No installed runtime/configuration change, enablement, gateway restart or backend change is part of this PR. The existing Friends backend accepted an arbitrary synthetic
session.idin a separate prior readback probe; existing token rollups are not claimed session-aware.Hakalya review: plugin PASS; coordinated merge HOLD
Reviewed exact head
5c8b55402fd773fc7809a6b697b9f7ad8e3ba5feagainst84313e4961d9005b39876f2814f3d0e53cc64f12.No material blocker found in this plugin diff. Verified strict boolean opt-in/default-off, absence of global session fallback, matching session dimension in attributes/baseline/overflow keys, unchanged routing and request deduplication, and documented privacy/cardinality limitations.
Independently ran the complete plugin suite with
PYTHONPATHandHERMES_TEST_CORE_PATHtargeting Core head1f75c9723a38f8cc5563037ce3be4c634c44357c: 83 passed, including the real async Core → plugin → SDK → local HTTP collector → decoded OTLP matrix. Tests used isolated HOME/HERMES_HOME, dedicated uv cache and copy mode. Diff whitespace check passed.Merge held: companion Core PR HoroTW/hermes-agent#27 has a material auxiliary-session propagation blocker documented there: scoped runtime normalization strips explicit session IDs; known out-of-turn auxiliary entry points and post-compression rotation are not fully propagated. No plugin change is requested by this finding. Both PRs remain unmerged pending the coordinated fix.
No deployment, configuration change, backend write or gateway restart performed. Calcifer's production readback is external evidence, not independently reverified in this review.
Hakalya exact-head review: PASS at
5c8b55402fd773fc7809a6b697b9f7ad8e3ba5fe.Targeted closure review of the previously reported auxiliary ownership paths: scoped normalization preserves session/cache scope; manual compression binds ownership inside the real worker; worker/caller rotation uses copy-on-write identity refresh without changing provider routing or logical cache affinity; image pre-analysis takes the already-opened store session and clears unknown identity. Previous blocker is resolved. No new tracker, global identity fallback or infrastructure required.
Independent verification against Core
3bcf1beb256a2940aa62675cb2bff644c6271d0band plugin5c8b55402fd773fc7809a6b697b9f7ad8e3ba5fe: canonical Core runner 400 passed / 0 failed across the 8 documented files, including actual SessionDB rotation, manual worker ownership, copied-context isolation and concurrent vision; complete plugin suite 83 passed, including real async export-thread → SDK → local HTTP → OTLP protobuf integration. Diff check clean. These are my executed counts, not a claim to have rerun the author's additional 452/53 matrices.Default-off / strict opt-in and missing-identity semantics remain intact. Best-effort session correlation, not complete billing; unknown background ownership remains unlabelled. No assertion of a measured negligible token fraction. No remote CI status contexts are configured on these heads; local review/tests are the gate. No deployment, config change, production metric probe or restart.
Approved for the requested coordinated normal merges preserving source commit identity.
Merged normally as
efc2dc86989bd579e951e1839e87fb5472603326intomain. Post-merge API + Git readback verified: canonical branch points to this merge; reviewed head is preserved as a merge parent/ancestor; merged tree exactly equals the tested head tree. Companion PR also merged. PASS reviews are attached to the exact heads. No deployment, config change or restart.