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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
entitled
  • Loading branch information
mtojek committed Oct 10, 2023
commit 9ee99d5c6c54c7248ce28bd20d62d7fc87a00c9f
2 changes: 1 addition & 1 deletion coderd/prometheusmetrics/license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestCollectLicenseMetrics(t *testing.T) {
switch metric.GetName() {
case "coderd_license_active_users", "coderd_license_user_limit":
for _, m := range metric.Metric {
collected[m.Label[0].GetValue()+":"+metric.GetName()] = int(m.Gauge.GetValue())
collected[m.Label[0].GetName()+"="+m.Label[0].GetValue()+":"+metric.GetName()] = int(m.Gauge.GetValue())
}
default:
require.FailNowf(t, "unexpected metric collected", "metric: %s", metric.GetName())
Expand Down
4 changes: 2 additions & 2 deletions coderd/prometheusmetrics/testdata/license-metrics.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"true:coderd_license_active_users": 4,
"true:coderd_license_user_limit": 7
"entitled=true:coderd_license_active_users": 4,
"entitled=true:coderd_license_user_limit": 7
}