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

API Call Counter #297

Closed
humoflife opened this issue Nov 8, 2023 · 6 comments
Closed

API Call Counter #297

humoflife opened this issue Nov 8, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@humoflife
Copy link

What problem are you facing?

Crossplane users would like to know how many API calls to which APIs a provider makes. Please expose an API call counter metric at the provider metric interface.

There should be a roll up metric for all API calls, all API calls per API version, and a counter for each separate API/version. Those three categories could be satisfied through labels for the same metric. They would allow a quick view of overarching trend changes after updating or introducing new compositions, or additional claims. They would also inform about API version adoption, and provide an overview of which APIs are more popular and to which degree.

How could Upjet help solve your problem?

Implement and expose the following metrics at port 8080/metrics for all providers that are generated with Upjet.

api_call_count {group="...", version="...", kind="..."}

@candonov
Copy link

This is great! It would be useful to have a simple counter per each API and also a metric to calculate the duration of those api calls.

@haarchri
Copy link
Contributor

just for reference from crossplane-contrib/provider-aws:

crossplane-contrib/provider-aws#1964
crossplane-contrib/provider-aws#1862

@jeanduplessis jeanduplessis modified the milestones: 1.2, 1.3 Feb 3, 2024
@jeanduplessis
Copy link
Collaborator

@humoflife what is the core problem users are trying to solve by getting access to the API call counts?

@humoflife
Copy link
Author

Awareness of cost and trending towards API throttling.

@stevendborrelli
Copy link

Since it wasn't linked back here, this was added in provider-aws 1.3.0 via crossplane-contrib/provider-upjet-aws#1241

@jeanduplessis
Copy link
Collaborator

I'm going to close this issue as the implementation isn't Upjet specific, but rather something that has to be implemented specifically for each provider.

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

5 participants