]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Add Prometheus stats for admin count (#26284)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sun, 24 Mar 2024 03:48:04 +0000 (04:48 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Mar 2024 03:48:04 +0000 (14:48 +1100)
commita1817a12dbb385275f4273c1abf48fac0a989ddd
tree9e00e7f5e61fe046871efcfd9d507ee75d1c9472
parentcb97abb2defe5f333443997ccb82365e01ba1b6f
Add Prometheus stats for admin count (#26284)

* Add Prometheus stats for admin count

Fixes #20828

Reports time series for admin count. Counts are separated by state (active, AFK, or deadminned) and admin rank.

* Use static constructor instead of static readonly for the metric

Docs recommend this due to inconsistent execution of C# static constructors.

* Remove static usage, use IoC IMeterFactory.

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Content.Server/Administration/Managers/AdminManager.Metrics.cs [new file with mode: 0644]
Content.Server/Administration/Managers/AdminManager.cs