-
Notifications
You must be signed in to change notification settings - Fork 376
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
feat: expose metrics for all AWS API calls #1862
feat: expose metrics for all AWS API calls #1862
Conversation
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.
Thank you very much for your contribution, @threadproc! I think including AWS metric would a very meaningful enhancement.
I have made some small remarks that would need to be solved before merging. Can you take a look at them?
d281921
to
9acbf87
Compare
@MisterMX I've made the requested changes and resolved some linting errors as well, thanks for the review! |
Great, very nice that you found a way to two this via hooks in the SDK! |
Signed-off-by: Kai Parry <[email protected]>
9acbf87
to
27686ee
Compare
@MisterMX I've implemented the requested changes and squashed them down again, thank you! |
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.
LGTM. Thank you very much for your contribution @threadproc!
Description of your changes
This change will add a new Prometheus metric,
aws_api_calls_total
, exposed by controller-runtime that counts all requests made to the AWS APIs. This is useful when using expensive APIs like the Service Catalog API ($0.0007/request) for accounting purposes on accounts with multiple clusters.I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
This has been built and deployed to a test cluster where it was successfully observed to cause no errors when calling either v1 or v2 SDK methods, and successfully included the new metric on the
/metrics
endpoint.