-
Notifications
You must be signed in to change notification settings - Fork 2k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Graph Manager (Engine) reporting "extensions" become "plugins". #3998
refactor: Graph Manager (Engine) reporting "extensions" become "plugins". #3998
Commits on Apr 16, 2020
-
refactor: Graph Manager (Engine) reporting "extensions" become "plugi…
…ns". Similar to 6009d8a (#3991) and 68cbc93 (#3997), which migrated the tracing and cache-control extensions to the (newer) request pipeline plugin API, this commit introduces: - Internally, a `plugin` named export which is utilized by the `agent`'s `newExtension` method to provide a plugin which is instrumented to transmit metrics to Apollo Graph Manager. This plugin is meant to replicate the behavior of the `EngineReportingExtension` class which, as of this commit, still lives besides it. - Externally, a `federatedPlugin` exported on the main module of the `apollo-engine-reporting` package. This plugin is meant to replicate the behavior of the `EngineFederatedTracingExtension` class (also exported on the main module) which, again as of this commit, still lives besides it! Again, the delta of the commits seemed more confusing by allowing a natural `diff` to be made of it, I've left the extensions in place so they can be compared - presumably side-by-side in an editor - on the same commit. An (immediate) subsequent commit will remove the extension.
Configuration menu - View commit details
-
Copy full SHA for de7ba72 - Browse repository at this point
Copy the full SHA de7ba72View commit details -
fix: Keep special-cased errors (e.g. APQ not found) as unreported.
This fixes the failing tests which correctly surfaced on the last commit. Previously, prior to the new plugin API, the Apollo Engine Reporting mechanism was implemented using `graphql-extensions`, the API for which didn't invoke `requestDidStart` until _after_ APQ had been negotiated. The new plugin API starts its `requestDidStart` _before_ APQ validation and various other assertions which weren't included in the `requestDidStart` life-cycle, even if they perhaps should be in terms of error reporting. The new plugin API is able to properly capture such errors within its `didEncounterErrors` lifecycle hook (thanks to #3614, which intentionally captures these failures so plugin authors can accurately react to them), however, for behavioral consistency reasons, we will still special-case those errors and maintain the legacy behavior to avoid a breaking change. We can reconsider this in a future version of Apollo Engine Reporting (AS3, perhaps!). Ref: #3614 Ref: #3627 Ref: #3638
Configuration menu - View commit details
-
Copy full SHA for 78a4cb7 - Browse repository at this point
Copy the full SHA 78a4cb7View commit details -
eliminate!: Remove now deprecated
EngineReportingExtension
.The plugin implementation brought in de7ba72 supersedes the need for this implementation!
Configuration menu - View commit details
-
Copy full SHA for c67a6df - Browse repository at this point
Copy the full SHA c67a6dfView commit details
Commits on Apr 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for dce4a24 - Browse repository at this point
Copy the full SHA dce4a24View commit details -
no-op: Add back comment about
ftv1
trace format.This was inadvertently removed in the re-factor. Ref: https://github.com/apollographql/apollo-server/pull/3998/files#r414901517
1Configuration menu - View commit details
-
Copy full SHA for a8ab841 - Browse repository at this point
Copy the full SHA a8ab841View commit details
Commits on Apr 28, 2020
-
Use optional chaining when accessing optional
request.http.headers
....and destructuring.
Configuration menu - View commit details
-
Copy full SHA for fc05e8d - Browse repository at this point
Copy the full SHA fc05e8dView commit details -
Ensure
metrics
is present before plugin initialization.This eliminates the need to guard for the presence of `metrics` on the `requestContext` within plugins who are calling `requestDidStart`. Ref: #3998 (comment)
Configuration menu - View commit details
-
Copy full SHA for 48eab7e - Browse repository at this point
Copy the full SHA 48eab7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ca5d11 - Browse repository at this point
Copy the full SHA 8ca5d11View commit details -
Move
Trace.HTTP
init inside ofensurePreflight
.As noted in review within [[1]], there wasn't really a compelling reason for this to be kept separately from the other tree-building bits which existed within `ensurePreflight`. [1]: #3998 (comment)
Configuration menu - View commit details
-
Copy full SHA for 0658df5 - Browse repository at this point
Copy the full SHA 0658df5View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc966a4 - Browse repository at this point
Copy the full SHA fc966a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 766c738 - Browse repository at this point
Copy the full SHA 766c738View commit details -
chore!: Use
document
/source
rather thandocumentAST
/ `queryS……tring`. The use of `document` and `source` is the standard within the plugin API and the request pipeline, so these names should be more natural going forward. This wouldn't have been possible without a breaking change, but we're already doing that.
Configuration menu - View commit details
-
Copy full SHA for f4aad30 - Browse repository at this point
Copy the full SHA f4aad30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b0c83c - Browse repository at this point
Copy the full SHA 6b0c83cView commit details
Commits on Apr 29, 2020
-
Merge branch 'abernix/add-willResolveField-and-didResolveField' into …
…abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 48b8c95 - Browse repository at this point
Copy the full SHA 48b8c95View commit details
Commits on May 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 283e82f - Browse repository at this point
Copy the full SHA 283e82fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0949ec - Browse repository at this point
Copy the full SHA e0949ecView commit details -
Merge branch 'abernix/add-willResolveField-and-didResolveField' into …
…abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 0a0bd14 - Browse repository at this point
Copy the full SHA 0a0bd14View commit details -
Merge branch 'abernix/add-schema-and-schemaHash-to-requestContext' in…
…to abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 1756b37 - Browse repository at this point
Copy the full SHA 1756b37View commit details -
Configuration menu - View commit details
-
Copy full SHA for e813e5b - Browse repository at this point
Copy the full SHA e813e5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d913589 - Browse repository at this point
Copy the full SHA d913589View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39ff086 - Browse repository at this point
Copy the full SHA 39ff086View commit details
Commits on May 8, 2020
-
Merge branch 'abernix/add-schema-and-schemaHash-to-requestContext' in…
…to abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 4be279d - Browse repository at this point
Copy the full SHA 4be279dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba37e68 - Browse repository at this point
Copy the full SHA ba37e68View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9edd9a - Browse repository at this point
Copy the full SHA e9edd9aView commit details -
chore(e-r): Eliminate
ensurePreflight
by using (new) `didResolveSou……rce`. Leverages new life-cycle `didResolveSource` which was introduced by [[PR #4076]] and inspired by this [[comment]]. This is much nicer! [PR #4076]: #4076 [Comment]: https://github.com/apollographql/apollo-server/pull/3998/files#r414911049
Configuration menu - View commit details
-
Copy full SHA for b981b59 - Browse repository at this point
Copy the full SHA b981b59View commit details -
changelog: Add note that I believe some new APQ errors are now traced.
@glasser, are you able to confirm this belief and that it should be okay?
Configuration menu - View commit details
-
Copy full SHA for 6d4777d - Browse repository at this point
Copy the full SHA 6d4777dView commit details -
Revert "changelog: Add note that I believe some new APQ errors are no…
…w traced." This reverts commit 6d4777d.
Configuration menu - View commit details
-
Copy full SHA for bacbb17 - Browse repository at this point
Copy the full SHA bacbb17View commit details -
fix(e-r): Do not keep traces unless we resolve the "source".
Previously, I introduced a work-around for this in 78a4cb7, though that is no longer necessary with the introduction of `didResolveSource` in #4076 I'm thrilled to remove this! Ref: #3998 (comment)
Configuration menu - View commit details
-
Copy full SHA for 59b4013 - Browse repository at this point
Copy the full SHA 59b4013View commit details -
Merge branch 'abernix/add-schema-and-schemaHash-to-requestContext' in…
…to abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 16e471e - Browse repository at this point
Copy the full SHA 16e471eView commit details -
fix: Preserve client-requested
operationName
on op. name resolution…… failure. Addresses feedback in below referenced [[Comment]]. If operation resolution (parsing and validating the document followed by selecting the correct operation) resulted in the population of the `operationName`, we'll use that. (For anonymous operations, `requestContext.operationName` is null, which we represent here as the empty string.) If the user explicitly specified an `operationName` in their request but operation resolution failed (due to parse or validation errors or because there is no operation with that name in the document), we still put _that_ user-supplied `operationName` in the trace. This allows the error to be better understood in Graph Manager. (We are considering changing the behavior of `operationName` in these three error cases; see [[#3465]] below for details.) [Comment]: #3998 (comment) [#3465]: #3465
2Configuration menu - View commit details
-
Copy full SHA for b0948a8 - Browse repository at this point
Copy the full SHA b0948a8View commit details -
Merge branch 'abernix/add-schema-and-schemaHash-to-requestContext' in…
…to abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 7c8b8e3 - Browse repository at this point
Copy the full SHA 7c8b8e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62fc270 - Browse repository at this point
Copy the full SHA 62fc270View commit details
Commits on May 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c73cd16 - Browse repository at this point
Copy the full SHA c73cd16View commit details -
Merge branch 'abernix/add-willResolveField-and-didResolveField' into …
…abernix/migrate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for af2d6d8 - Browse repository at this point
Copy the full SHA af2d6d8View commit details
Commits on May 12, 2020
-
Merge branch 'release-2.14.0' into abernix/migrate-engine-reporting-e…
…xts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 1144c7a - Browse repository at this point
Copy the full SHA 1144c7aView commit details -
Merge remote-tracking branch 'origin/release-2.14.0' into abernix/mig…
…rate-engine-reporting-exts-to-plugin-api
Configuration menu - View commit details
-
Copy full SHA for 3ccccad - Browse repository at this point
Copy the full SHA 3ccccadView commit details