Skip to content

feat: expose user seat limits as Prometheus metrics #10169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Oct 13, 2023
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Oct 10, 2023

Related: #9983

This PR exposes user seat limit as Prometheus metrics. Values are pulled from Entitlements.

# HELP coderd_license_active_users The number of active users.
# TYPE coderd_license_active_users gauge
coderd_license_active_users{entitled="true"} 1
# HELP coderd_license_user_limit The user seats limit based on the active Coder license.
# TYPE coderd_license_user_limit gauge
coderd_license_user_limit{entitled="true"} 10

@mtojek mtojek marked this pull request as ready for review October 10, 2023 13:25
@johnstcn
Copy link
Member

It would probably also make sense to add the time (in seconds) until the current license expires. I could see admins keeping an eye on this.

@mtojek mtojek marked this pull request as draft October 11, 2023 12:54
@mtojek mtojek marked this pull request as ready for review October 12, 2023 11:49
@mtojek mtojek requested a review from spikecurtis October 12, 2023 11:49
@mtojek mtojek requested a review from spikecurtis October 13, 2023 08:00
Copy link
Contributor

@spikecurtis spikecurtis left a comment

Choose a reason for hiding this comment

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

LGTM

@mtojek mtojek enabled auto-merge (squash) October 13, 2023 08:06
@mtojek mtojek merged commit 2a4ac2a into main Oct 13, 2023
@mtojek mtojek deleted the 9983-license-prometheus branch October 13, 2023 08:10
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants