diff --git a/CHANGELOG.md b/CHANGELOG.md index 79233b7df25..999e1308415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,8 @@ - Updated the google-cloud-functions package to handle null paths [PR #1674](https://github.com/apollographql/apollo-server/pull/1674) - Update link inside Authentication Docs [PR #1682](https://github.com/apollographql/apollo-server/pull/1682) -- Provide ability to specify client info in traces [#1631](https://github.com/apollographql/apollo-server/pull/1631) - Fix making sure all headers are getting reported to Engine properly when using `privateHeaders` [PR #1689](https://github.com/apollographql/apollo-server/pull/1689) +- _(experimental, subject to change/removal)_ Provide ability to specify client info in traces [#1631](https://github.com/apollographql/apollo-server/pull/1631) ### v2.0.8 diff --git a/docs/source/api/apollo-server.md b/docs/source/api/apollo-server.md index 90bbea8d71f..3b39fc456f6 100644 --- a/docs/source/api/apollo-server.md +++ b/docs/source/api/apollo-server.md @@ -365,13 +365,3 @@ addMockFunctionsToSchema({ * `maskErrorDetails`: boolean Set to true to remove error details from the traces sent to Apollo's servers. Defaults to false. - -* generateClientInfo?: (o: { context: any, extensions?: Record}) => ClientInfo; - - Creates the client information that is attached to the traces sent to the - Apollo backend. The context field is the execution context passed to the - resolvers and the extensions field corresponds to the same value in the POST - body or GET parameters. `ClientInfo` contains fields for `clientName` and - `clientVersion`, which are both optional. The default generation copies the - respective fields from `extensions.clientInfo`. If `clientName` or - `clientVersion` is not present, the values are set to the empty string. diff --git a/packages/apollo-engine-reporting/src/agent.ts b/packages/apollo-engine-reporting/src/agent.ts index 6169d5115ce..8d2587fe5be 100644 --- a/packages/apollo-engine-reporting/src/agent.ts +++ b/packages/apollo-engine-reporting/src/agent.ts @@ -88,18 +88,21 @@ export interface EngineReportingOptions { sendReportsImmediately?: boolean; // To remove the error message from traces, set this to true. Defaults to false maskErrorDetails?: boolean; - // Creates the client information attached to the traces sent to the Apollo - // backend + + /** + * (Experimental) Creates the client information for operation traces. + * + * @remarks This is experimental and subject to change or removal. + * + * @private + * + */ generateClientInfo?: ( o: { context: any; extensions?: Record; }, ) => ClientInfo; - - // XXX Provide a way to set client_name, client_version, client_address, - // service, and service_version fields. They are currently not revealed in the - // Engine frontend app. } const REPORT_HEADER = new ReportHeader({