This repository was archived by the owner on Jun 20, 2024. It is now read-only.
generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Support Server-Timing header #69
Copy link
Copy link
Open
Description
TODO
This feature may be useful enough to be promoted upstream:
- support timing info from caboose support in feat: add Server-Timing headers #71.
- add gateway-related timing here
- evaluate usefullness
- decision to move middleware to upstream boxo/gateway library
What and why
Ref. https://www.w3.org/TR/server-timing/
TLDR: we want to leverage UI in modern browsers to give more info about where Gateway request was spent:
How
TBD, there is a library at https://github.com/mitchellh/go-server-timing + slack thread
Middleware for injecting the server timing struct into the request Context and writing the Server-Timing header.
there is slight risk middleware will not be compatible with how we do subdomains, but that is tbd.
we can give it a try in bifrost-gateway and see how it goes.
on the surface level it sounds sensible,
- only normal header, no Trailers (http.headers.Trailer - reading trailers not supported by Fetch API mdn/browser-compat-data#14703)
- context thing does not require another API rewrite, caboose can set whatever it wants, we would return it
- if we find this useful,
boxo/gatewaycould add own metrics and/or we could make this part of Gateway spec
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
