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
Prometheus metrics #1446
Prometheus metrics #1446
Conversation
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
Signed-off-by: Kevin Minehart <kmineh0151@gmail.com>
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.
I love this! This is amazing, so clear and clean. Just some minor things but it's pretty much good to go IMO!
I think this should fix current
|
I didn't even look at the tests since they require this PR to be merged in first: which adds those undefined types. |
Is there an update to when we can expect this to land in master? More insights into the running instance of Hydra would be very helpful to narrow down some issues. |
Unfortunately not right now. We support Jaeger / OpenTracing though which should probably help more than these prometheus stats :) Basic prometheus exporter is also supported in Hydra already. |
I am looking for more per-client metrics (number of token requests vs failed token requests) etc more than pure timings for the different paths. The metrics that are already exposed, while helpful, only show Go stats, and nothing specific to Hydra. |
Related issue
#1176
ory/x#49
Proposed changes
I've changed my approach since the last PR that was made.
This is in-tandem with ory/x#49.
The general idea is to wrap the central types with a
Metrics...
struct, which can be used interchangeably with whatever it wraps.A good example is seen with the consent/metrics.go or client/metrics.go file. This nice thing about this approach is that it keeps the metric collection fairly central, though there are a few places where
WithMetrics(NewSQLManager)
must be used instead of justNewSQLManager(...)
.Not all the metrics requested were added in here. I figured since i was changing directions so many times, it would be worth checking out the approach for the current metrics I have now before I proceeded to implement this for the Strategy interface.
Checklist
vulnerability, I confirm that I got green light (please contact hi@ory.sh) from the maintainers to push the changes.
Further comments
See the other discussion comments in ory/x#49 for more implementation details about how metrics are collected.