[WIP] Add support for Server Timing headers#1490
Closed
stipsan wants to merge 2 commits into
Closed
Conversation
Server Timing headersServer Timing headers
Author
|
@pranaygp well I’ve been waiting for feedback for a while now. I wouldn’t hold my breath 😉 |
Member
|
I think this could be built as a plugin using willResolveField just like the usage reporting plugin does. (When this PR was written, willResolveField didn't exist; it was added in #3988.) It thus doesn't need to be part of the core project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is not merge ready, I'm opening it early to discuss the prospect of the feature itself and if I'm on the right track with it or not.
The Server Timing headers enable more information in the Chrome DevTools on each individual request:
View larger image with more context.
Server Timing information is complimentary to existing tracing information. Some of its constraints is that you can only specify a duration per field, no start or end times to create a timeline context in relation to the other fields that might happen in parallel or before/after one another.
It's very suitable to show a brief overview over where the most time were spent in a query. This PR walks through the tracing information in the response and reduces it to the longest duration per path.
Looking forward to your feedback 😄
TODO:
Pull Request Labels