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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add support for Server Timing headers #1490

Closed
wants to merge 2 commits into from
Closed

[WIP] Add support for Server Timing headers #1490

wants to merge 2 commits into from

Conversation

stipsan
Copy link

@stipsan stipsan commented Aug 5, 2018

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:

skjermbilde 2018-08-05 kl 17 29 30

View larger image with more context. skjermbilde 2018-08-05 kl 17 30 45

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:

  • Update CHANGELOG.md with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

Pull Request Labels

  • feature
  • blocking
  • docs

@ghost ghost added the 鉀诧笍 feature New addition or enhancement to existing solutions label Aug 5, 2018
@hwillson hwillson changed the title Add support for Server Timing headers [WIP] Add support for Server Timing headers Nov 14, 2018
@abernix abernix closed this Jun 24, 2020
@abernix abernix reopened this Jun 25, 2020
@abernix abernix changed the base branch from master to main June 25, 2020 09:05
@pranaygp
Copy link

pranaygp commented Jul 5, 2020

ETA on this being merged @abernix / @stipsan?

I'm considering rolling it myself (referencing the work done in this PR) for my apollo server instance

@stipsan
Copy link
Author

stipsan commented Jul 6, 2020

@pranaygp well I鈥檝e been waiting for feedback for a while now. I wouldn鈥檛 hold my breath 馃槈

@glasser
Copy link
Member

glasser commented Oct 4, 2022

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.

@glasser glasser closed this Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
鉀诧笍 feature New addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants