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
Instrumentation reporting low numbers when using DataLoader #859
Comments
It would report how long the particular resolver took. If you're using a cache, it would only reflect the actual data fetch when not pulling the data from the cache. |
Sorry, I meant the data loader's cache. |
I'm not aware of any metrics captured specific to using a DataLoader. The main metrics being captured are on a per-field (resolver) basis. If that field uses a DataLoader then the time it takes to fetch could be different if pulling from the DataLoader's cache vs. the first time it fetches. Here's the docs for metrics: https://graphql-dotnet.github.io/docs/getting-started/metrics And the implementation of
|
It looks to me like the |
@johnrutherford Ha, duh - yes that would do it. |
@joemcbride There seems to be an implementation of |
@RehanSaeed Yes, I'm updating that with async/await. Metrics are not enabled by default in the server project. You would need to create your own class that inherits from |
Thanks for this! |
This is published in 2.3.0 (along with a few other things) |
I suspect instrumentation only reports time to fetch from cache, not the actual data fetch.
The text was updated successfully, but these errors were encountered: