-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Collect metrics if a client token is available #5177
Conversation
d2eac29
to
6085ead
Compare
Codecov Report
|
7398634
to
9619bd8
Compare
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.
G2G doc wise :)
421747f
to
d0308cc
Compare
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.
Reviewed just a part for now, still missing metadata and there are still a few things I don't understand regarding how you setup tests.
tags = list(self._tags) | ||
tags.extend(dynamic_tags) | ||
for submit_function in submission_queue: | ||
submit_function(tags=tags) |
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.
That's a more abstract logic but I don't think we can do better without adding more api calls. In any case that's 10 times better than the previous logic
self.log.exception(msg) | ||
raise ApiUnreachable | ||
self.service_check(self.SERVICE_CHECK_CONNECT, self.CRITICAL, message=msg, tags=self._tags) | ||
raise ApiUnreachable(msg) |
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.
If the Vault API fails here, we won't collect prometheus metrics. I'd say it's worth to catch the error and collect prometheus metrics as well.
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.
Would would the service check be if only a subset of calls succeed?
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.
That's fair, or else we can have one service check for the API and one for prometheus?
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.
* Add audit, core, token, runtime metrics * add auth, WAL metric * Remove duplicate * add replication metrics pt1 * Add replication metrics and secrets engine metrics * Finish adding storage backend metrics * Fix metric type * Fix policy summary description * Fix typos * Keep capitalized secrets engines metrics
Fixed by #5224 |
Additional Notes
Also, ensures consistent tags. Previously: