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

Consider prometheus histogram metrics in pool #365

Closed
alexvanin opened this issue Nov 15, 2022 · 3 comments · Fixed by #368
Closed

Consider prometheus histogram metrics in pool #365

alexvanin opened this issue Nov 15, 2022 · 3 comments · Fixed by #368
Assignees
Labels
enhancement Improving existing functionality pool Issue related to the pool U4 Nothing urgent

Comments

@alexvanin
Copy link
Contributor

Request time distribution looks kinda cool: nspcc-dev/neo-go#2750
Probably we can adopt metric interface to provide simple histogram data to service apps.

@alexvanin
Copy link
Contributor Author

alexvanin commented Nov 17, 2022

Estimate possibilities of these changes:

  • We can return actual request durations from pool instead of avg.
  • We can have callback for each pool request.
  • We can discuss tight integration of prometheus and pool (backup plan).

@KirillovDenis
Copy link
Contributor

KirillovDenis commented Nov 29, 2022

return actual request durations

In this case I suppose we can have only last n requests durations for each methods (we can configure n in pool params)

have callback for each pool request

We can define something like this:

type RequestCallback func(RequestInfo)

type RequestInfo struct {
	Address    string
	MethodName string
	Elapsed    time.Duration
}

Both options are possible and require almost the same efforts.
Callback seems more convenient

@alexvanin
Copy link
Contributor Author

Callback implementation looks very nice. Let's go for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality pool Issue related to the pool U4 Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants