Skip to content

Commit

Permalink
Revert "Make it more clear that generateClientInfo is an experiment…
Browse files Browse the repository at this point in the history
…al API."

This reverts commit 6d6c9ff.
  • Loading branch information
abernix committed Sep 27, 2018
1 parent 0b4e36b commit 03a894d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,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

Expand Down
10 changes: 10 additions & 0 deletions docs/source/api/apollo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,13 @@ 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<string, any>}) => 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.
15 changes: 6 additions & 9 deletions packages/apollo-engine-reporting/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,18 @@ export interface EngineReportingOptions {
sendReportsImmediately?: boolean;
// To remove the error message from traces, set this to true. Defaults to false
maskErrorDetails?: boolean;

/**
* (Experimental) Creates the client information for operation traces.
*
* @remarks This is experimental and subject to change or removal.
*
* @private
*
*/
// Creates the client information attached to the traces sent to the Apollo
// backend
generateClientInfo?: (
o: {
context: any;
extensions?: Record<string, any>;
},
) => 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({
Expand Down

0 comments on commit 03a894d

Please sign in to comment.