Skip to content
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

Metrics refactoring #298

Open
3 tasks
ateska opened this issue Oct 6, 2023 · 0 comments
Open
3 tasks

Metrics refactoring #298

ateska opened this issue Oct 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ateska
Copy link
Contributor

ateska commented Oct 6, 2023

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 and anonymous_sessions metrics should be unified into: sessions: regular / anonymous.

self.AnonymousSessionCounter: asab.metrics.Counter = self.MetricsService.create_counter(

self.SessionGauge = self.MetricsService.create_gauge(

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}
)
@ateska ateska added the enhancement New feature or request label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant