-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Expose metrics about used TeamForCapella license usage #1387
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1387 +/- ##
==========================================
+ Coverage 72.99% 73.11% +0.11%
==========================================
Files 164 165 +1
Lines 5451 5490 +39
Branches 618 624 +6
==========================================
+ Hits 3979 4014 +35
- Misses 1334 1335 +1
- Partials 138 141 +3 ☔ View full report in Codecov by Sentry. |
c4bb6b7
to
910d169
Compare
910d169
to
21d4c9a
Compare
d8fb1ab
to
91d5637
Compare
5644ec2
to
a6812e7
Compare
Two new gauge metrics `used_t4c_licenses` and `total_t4c_licenses` were added to the `/metrics` endpoint, which contain the number of currently used and total licenses per TeamForCapella instance. The instance name is used as label for the metric. Note: If you have multiple TeamForCapella server instances, which point to the same license server, this is not detected. Therefore, make sure to filter the `t4c_licenses` for one instance first.
a6812e7
to
98fc67e
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I was going to suggest using an (abstract) collector
class, since the two collectors are very similar (and there is the possibility to outsource the retrieval of the instances), but apparently there is already such an abstract class in the Prometheus client, but starlett-prometheus
uses a rather old version of it where it is not yet added.
A new gauge metric
t4c_licenses
was added to the/metrics
endpoint, which contains the number of currently used licenses per TeamForCapella instance. The instance name is used as label for the metric.Note: If you have multiple TeamForCapella server instances, which point to the same license server, this is not detected. Therefore, make sure to filter the
t4c_licenses
for one instance first.Resolves #693.