Skip to content

feat: add Prometheus metrics for license warnings and errors#21749

Merged
mtojek merged 2 commits intomainfrom
issue-767-tkh7
Jan 29, 2026
Merged

feat: add Prometheus metrics for license warnings and errors#21749
mtojek merged 2 commits intomainfrom
issue-767-tkh7

Conversation

@mtojek
Copy link
Member

@mtojek mtojek commented Jan 29, 2026

Fixes: coder/internal#767

Adds two new Prometheus metrics for license health monitoring:

  • coderd_license_warnings - count of active license warnings
  • coderd_license_errors - count of active license errors

Metrics endpoint after startup of a deployment with license enabled:

...
# HELP coderd_license_errors The number of active license errors.
# TYPE coderd_license_errors gauge
coderd_license_errors 0
...
# HELP coderd_license_warnings The number of active license warnings.
# TYPE coderd_license_warnings gauge
coderd_license_warnings 0
...

@mtojek mtojek changed the title feat(license): add Prometheus metrics for license warnings and errors feat: add Prometheus metrics for license warnings and errors Jan 29, 2026
This adds two new Prometheus metrics to track license health:
- coderd_license_warnings - count of active license warnings
- coderd_license_errors - count of active license errors

Also adds Warnings() method to entitlements.Set to expose warnings
similar to the existing Errors() method.

Relates to: coder/internal#767
@mtojek mtojek requested a review from johnstcn January 29, 2026 12:20
@mtojek mtojek marked this pull request as ready for review January 29, 2026 12:20
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

LGTM, but don't forget to update docs/admin/integrations/prometheus.md with the new metrics.

@mtojek mtojek merged commit 04b0253 into main Jan 29, 2026
28 checks passed
@mtojek mtojek deleted the issue-767-tkh7 branch January 29, 2026 12:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
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.

Add Prometheus metrics for license warnings/errors

2 participants