-
Notifications
You must be signed in to change notification settings - Fork 663
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
[3.x] Add hooks for monitoring request speed/active requests #3221
Comments
No APIs in mind at this very second other than a start/stop for parsing objects, but thank you for opening a dialog. At the moment This would all be super helpful for performance metrics we want to track. If you think it would be more helpful, at some point this week I can open a sample diff for what I would have in mind as a great-to-have. |
We could make each piece of the pipeline report their information in the
And for network:
Results might be composed from multiple caches but I guess we could take the "deepest" one.
Samples are super welcome! |
Created two rough sample PRs from some ideas I was spitballing |
class HttpInfo(
val millisStart: Long,
val millisEnd: Long,
val statusCode: Int,
val headers: List<HttpHeader>
) class CacheInfo(
val millisStart: Long,
val millisEnd: Long,
val hit: Boolean,
val missedKey: String?,
val missedField: String?,
) It also has apolloClient.withFlowDecorator {
it.onStart {
// log start
}.onEach {
// log response
}.onCompletion {
// log end
}
} @AdamMTGreenberg let me know how that looks and if anything else is needed. |
@martinbonnin thanks for this - it looks awesome. I'll have to dig in, but offhand do you know if in |
You mean what thread the
So it will not account for any Thread context switch. |
Thank you! |
Heads up that |
I'm going to close this issue. There are a bunch of extension points already:
@AdamMTGreenberg let us know if there's something you can't do with those and I'll reopen this issue. |
Follow up from #2674.
@AdamMTGreenberg if you already have an API in mind, feel free to comment here, else we can update as we go.
The text was updated successfully, but these errors were encountered: