Instrument skill handlers and dialog rendering - #509
Conversation
📝 WalkthroughWalkthroughAdds process-local latency histograms for skill-handler execution and dialog rendering. Instruments eligible handlers and rendering paths, registers the metrics provider, adds runtime tests, and documents histogram semantics and exposure. ChangesRuntime performance metrics
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant EventSystem
participant OVOSSkill
participant SKILL_HANDLER
participant DIALOG_RENDER
EventSystem->>OVOSSkill: dispatch handler with handler_info
OVOSSkill->>SKILL_HANDLER: measure handler execution
SKILL_HANDLER-->>OVOSSkill: record duration
OVOSSkill->>DIALOG_RENDER: measure dialog rendering
DIALOG_RENDER-->>OVOSSkill: record duration
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
| ) | ||
|
|
||
|
|
||
| class LatencyHistogram: |
There was a problem hiding this comment.
I have some doubts on this one, maybe we need metrics helpers in ovos-utils to use across all other packages? we have the StopWatch class in there already.
There was a problem hiding this comment.
Agreed—the exporter is already provider/entry-point driven, but the low-level monotonic histogram storage should be shared instead of copied. I extracted that dependency-free primitive to OpenVoiceOS/ovos-utils#416. Workshop cannot import Core without reversing the dependency direction, and I do not want to hide the coordination behind a fallback/getattr. The intended order is: review and release #416, then replace this PR’s local helper and bump the explicit ovos-utils minimum. Metric ownership stays in Workshop; scrape/export policy stays in the host runtime. I am leaving this thread unresolved until that prerequisite and consumer rebase are complete.
What changed
speak_dialogandget_responseretry pathsovos.performance.metricsArchitecture and scope
Workshop owns these skill-level observations;
ovos-coreremains the sole HTTP exporter owner. No session, skill, utterance, request, or other unbounded value is exported as a label.The earlier reply-tracing experiment was removed from the final diff. Direct-emitting skills can bypass a skill-mixin hook, and generic request IDs are not an OVOS message contract. This PR is metrics-only.
Jarbas's shared-helper review is tracked explicitly: OpenVoiceOS/ovos-utils#416 adds the dependency-free monotonic histogram primitive. The intended release order is to review and release #416, then replace this PR's local helper and bump the minimum
ovos-utilsversion. Workshop will not import Core and create a dependency cycle, and no fallback orgetattrwill hide package skew.Why
The HiveMind bridge metrics stop before OVOS skill execution. Handler and dialog boundaries expose the remaining user-visible work while preserving message, handler, and rendering semantics.
Validation
Current head
9efd827ee6b3f29d31407f950f74019a46ca66a8:devin the same reused environmentgit diff --check: passed