Open ateska opened 10 months ago
Currently, metrics produced by the SeaCat Auth are a bit illogical and should be refactored:
help
unit
^- these two may be about the implementation in the InfluxDB forwarded in ASAB, it is linked with Prometheus implementation.
sessions
anonymous_sessions
regular
anonymous
https://github.com/TeskaLabs/seacat-auth/blob/27011e05fc4c1b7b4406686b3d99195062e864e9/seacatauth/session/algorithmic.py#L44
https://github.com/TeskaLabs/seacat-auth/blob/27011e05fc4c1b7b4406686b3d99195062e864e9/seacatauth/session/service.py#L84
Proposed change:
self.AnonymousSessionCounter: asab.metrics.Counter = self.MetricsService.create_counter( "sessions", tags={"help": "Number of anonymous sessions created."}, init_values={"anonymous": 0} )
self.SessionGauge = self.MetricsService.create_gauge( "sessions", tags={"help": "Counts active sessions."}, init_values={"regular": 0} )
Currently, metrics produced by the SeaCat Auth are a bit illogical and should be refactored:
help
attribute should be removed (at least from the propagation to InfluxDB)unit
attribute should be removed (at least from the propagation to InfluxDB)^- these two may be about the implementation in the InfluxDB forwarded in ASAB, it is linked with Prometheus implementation.
sessions
andanonymous_sessions
metrics should be unified into:sessions
:regular
/anonymous
.https://github.com/TeskaLabs/seacat-auth/blob/27011e05fc4c1b7b4406686b3d99195062e864e9/seacatauth/session/algorithmic.py#L44
https://github.com/TeskaLabs/seacat-auth/blob/27011e05fc4c1b7b4406686b3d99195062e864e9/seacatauth/session/service.py#L84
Proposed change: