GraphQL client sends feature category header
- GraphQL calls return feature category and query file name to server
- Add labels from headers in web_transaction metrics
- Add x-gitlab-feature-category header to startup gql calls
What does this MR do?
EDIT:
This MR adds an ApolloLink
which sets the x-gitlab-feature-category
header to requests made from Apollo based on the gon.feature_category
. This will be used to immediately help segment performance data for the GraphQL endpoint.
Originally, this MR also added x-gitlab-graphql-query-path
, but this broke Apollo request batching ([see comment]*(!66937 (comment 652289139))). See the original description below for more details.
ORIGINAL:
This is a proof-of-concept to add feature category and query file name headers to add graphql calls.
Part of #336431 (closed)
Part of #328535
It adds two headers:
x-gitlab-feature-category
x-gitlab-graphql-query-path
Header names are up for discussion.
Next steps:
- How do we configure CORS headers, change preflight responses for GitLab?
- Add support for mutations
cc @grzesiek
Screenshots or Screencasts (strongly suggested)
EDIT:
When visiting a single issue on the local GDK:
Description | Screenshot |
---|---|
|
|
|
ORIGINAL:
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)
Edited by Paul Slaughter