-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
apollo.router.operations
to the outer layer of the router pipe…
…line. (#3919) Our metrics are currently mutated at the supergraph service. This is a throwback from when the router service did not exist. Move operation count metrics to the first thing that happens in the pipeline. Note that this won't catch disconnects because they are reliant on the status code of the response, which will stop processing before the metric is incremented. This also move the creation of the root span to the just after so that cors and extensions are traced. Fixes #3915 <!-- start metadata --> --- **Checklist** Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review. - [ ] Changes are compatible[^1] - [ ] Documentation[^2] completed - [ ] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **Notes** [^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. --------- Co-authored-by: bryn <[email protected]>
- Loading branch information
Showing
5 changed files
with
54 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### Ensure that telemetry happens first ([Issue #3915](https://github.com/apollographql/router/issues/3915)) | ||
|
||
Telemetry related logic is now moved to the first thing in the router pipeline. | ||
|
||
Previously the metric `apollo.router.operations` may have missed some requests if they were failed at the router stage. | ||
In addition, some logic happened before root spans were created, which would have caused missing traces. | ||
|
||
`apollo.router.operations` and root spans are now the first thing that happens in the router pipeline for graphql requests. | ||
|
||
|
||
|
||
By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/3919 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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