Conversation
Signed-off-by: querdenker2k <querdenker2k@gmx.de>
Signed-off-by: querdenker2k <querdenker2k@gmx.de>
There was a problem hiding this comment.
Pull request overview
This PR aims to add observability around rule performance by emitting Prometheus/Micrometer metrics for rule execution duration (and logging timing information), so slow-running rules can be identified.
Changes:
- Add a new
openhab.rule.durationtimer metric alongside the existing rule run counter. - Track rule RUNNING→IDLE transitions to measure execution duration per rule.
- Rename the event count metric from
event_counttoevent.count.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
bundles/org.openhab.core.io.monitor/.../RuleMetric.java |
Adds rule-duration timer metric and state tracking for RUNNING/IDLE transitions. |
bundles/org.openhab.core.io.monitor/.../EventCountMetric.java |
Renames the emitted event count metric. |
Comments suppressed due to low confidence (1)
bundles/org.openhab.core.io.monitor/src/main/java/org/openhab/core/io/monitor/internal/metrics/RuleMetric.java:39
- The class Javadoc says this implements a “gauge metric”, but the implementation now publishes a counter and a timer (duration). Please update the Javadoc to reflect the actual metrics emitted (including the new duration metric name), so users know what to expect.
* The {@link RuleMetric} class implements a gauge metric for rules RUNNING events (per rule)
*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: querdenker2k <querdenker2k@gmx.de>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
[Metrics] Monitor rule execution duration
Description
With this you can monitor the execution duration of your rules, to see whats running slow.
This is added via metrics (prometheus).
The execution time is as well printed to the logs.