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

Using listener could lead to huge amount of API requests accounted in Usage metrics #155

Open
sorokin-energi opened this issue Aug 25, 2023 · 2 comments

Comments

@sorokin-energi
Copy link

Hi,

We noticed huge amount of API requests lately in the Usage stats. After some discussion with a community engineer at Sanity.io we found that it might be caused by /listen requests in the Studio (I guess editors just leave tabs open or something).

I dug it a bit more and found that in v1 useListenQuery is used.

Could/should such requests be counted at all? (I expected no requests from Studio will be counted, but it seems requests from plugins are counted).
Does the plugin really need to use listen? Any suggestions how we can reduce count of requests? (We cannot migrate to v2 at the moment).

@LiamMartens
Copy link
Collaborator

@sorokin-energi as far as I know requests coming from the studio aren't being counted - I don't know about plugins though. I would have to check with @SimeonGriggs

@sorokin-energi
Copy link
Author

@LiamMartens this ticket is kinda result of the investigation of the Community Engineer at Sanity.io. We were checking why our team exceeds API quotas considering quite a moderate amount of requests from the end customers and the most traffic was from this /listen endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants