Skip to content

Add websocket_connected metric and configurable prometheus_job_id - #46

Closed
vineeshah wants to merge 1 commit into
SCE-Development:mainfrom
vineeshah:main
Closed

Add websocket_connected metric and configurable prometheus_job_id#46
vineeshah wants to merge 1 commit into
SCE-Development:mainfrom
vineeshah:main

Conversation

@vineeshah

Copy link
Copy Markdown

Resolves #44 and #45.

#44 - new websocket_connected gauge (1 connected / 0 not), set on smee connect and reset in the finally so every disconnect path reports 0.

#45 - parse optional prometheus_job_id from config.yml so multiple sce-cicd instances stop overwriting each other's pushgateway metrics. Falls back to "sce-cicd" when unset.

Tested locally against smee2 + one.sce: connect→1, kill smee2→0, custom job id lands as its own group, mock push pushes last_push_timestamp{repo}. Screenshot of test added below.

Screenshot 2026-09-02 at 6 42 26 PM

@adarshm11 adarshm11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but can we split into two PRs, one resolving each issue

@vineeshah

Copy link
Copy Markdown
Author

Split into two focused PRs, one per issue: #47 (#44 websocket_connected metric) and #48 (#45 configurable prometheus_job_id). Closing this in favor of those.

@vineeshah vineeshah closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add monitoring for webhook connecton closing

2 participants