fix: Initialize Prometheus healthy/recording metrics with current status#591
Open
mozkomor05 wants to merge 1 commit intojitsi:masterfrom
Open
fix: Initialize Prometheus healthy/recording metrics with current status#591mozkomor05 wants to merge 1 commit intojitsi:masterfrom
mozkomor05 wants to merge 1 commit intojitsi:masterfrom
Conversation
110fc04 to
2bce7f6
Compare
|
Hi, thanks for your contribution! |
Author
|
Done |
2bce7f6 to
d9b9912
Compare
The `jitsi_jibri_healthy` and `jitsi_jibri_recording` Prometheus gauges default to 0 and only update on status transitions via publishStatus(). Since Jibri starts healthy with no transition, the metrics remain at 0 even though the instance is healthy. Seed the metrics with the current status immediately after registering the status handler so they reflect the actual state from startup. Fixes jitsi#590
d9b9912 to
1a3dd92
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
jitsi_jibri_healthyandjitsi_jibri_recordingPrometheus gauges default to0and only update on status transitions viapublishStatus(). Since Jibri starts healthy with no transition, the metrics remain at0even though the instance is healthy and idle.This adds a single line to seed the metrics with
jibriStatusManager.overallStatusimmediately after registering the status handler.Before:
jitsi_jibri_healthystays0.0until the first recording session triggers a state change.After:
jitsi_jibri_healthycorrectly reports1.0from startup.Verification
Fixes #590