Skip to content
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

usage reporting: remove client reference ID #5890

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ The version headers in this history reflect the versions of Apollo Server itself
- [`@apollo/gateway`](https://github.com/apollographql/federation/blob/HEAD/gateway-js/CHANGELOG.md)
- [`@apollo/federation`](https://github.com/apollographql/federation/blob/HEAD/federation-js/CHANGELOG.md)

## vNEXT
## vNEXT (minor!)

- `apollo-server-core`: Usage reporting no longer sends a "client reference ID" to Apollo Studio (along with the client name and client version). This little-used feature has not been documented [since 2019](https://github.com/apollographql/apollo-server/pull/3180) and is currently entirely ignored by Apollo Studio. This is technically incompatible as the interface `ClientInfo` no longer has the field `clientReferenceId`; if you were one of the few users who explicitly set this field and you get a TypeScript compilation failure upon upgrading to v3.6.0, just stop using the field. [PR #5890](https://github.com/apollographql/apollo-server/pull/5890)

## v3.5.0

Expand Down
12 changes: 0 additions & 12 deletions packages/apollo-reporting-protobuf/generated/protobuf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ export interface ITrace {
/** Trace clientAddress */
clientAddress?: (string|null);

/** Trace clientReferenceId */
clientReferenceId?: (string|null);

/** Trace http */
http?: (Trace.IHTTP|null);

Expand Down Expand Up @@ -105,9 +102,6 @@ export class Trace implements ITrace {
/** Trace clientAddress. */
public clientAddress: string;

/** Trace clientReferenceId. */
public clientReferenceId: string;

/** Trace http. */
public http?: (Trace.IHTTP|null);

Expand Down Expand Up @@ -1875,9 +1869,6 @@ export class QueryLatencyStats implements IQueryLatencyStats {
/** Properties of a StatsContext. */
export interface IStatsContext {

/** StatsContext clientReferenceId */
clientReferenceId?: (string|null);

/** StatsContext clientName */
clientName?: (string|null);

Expand All @@ -1894,9 +1885,6 @@ export class StatsContext implements IStatsContext {
*/
constructor(properties?: IStatsContext);

/** StatsContext clientReferenceId. */
public clientReferenceId: string;

/** StatsContext clientName. */
public clientName: string;

Expand Down
40 changes: 0 additions & 40 deletions packages/apollo-reporting-protobuf/generated/protobuf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ $root.Trace = (function() {
* @property {string|null} [clientName] Trace clientName
* @property {string|null} [clientVersion] Trace clientVersion
* @property {string|null} [clientAddress] Trace clientAddress
* @property {string|null} [clientReferenceId] Trace clientReferenceId
* @property {Trace.IHTTP|null} [http] Trace http
* @property {Trace.ICachePolicy|null} [cachePolicy] Trace cachePolicy
* @property {Trace.IQueryPlanNode|null} [queryPlan] Trace queryPlan
Expand Down Expand Up @@ -140,14 +139,6 @@ $root.Trace = (function() {
*/
Trace.prototype.clientAddress = "";

/**
* Trace clientReferenceId.
* @member {string} clientReferenceId
* @memberof Trace
* @instance
*/
Trace.prototype.clientReferenceId = "";

/**
* Trace http.
* @member {Trace.IHTTP|null|undefined} http
Expand Down Expand Up @@ -264,8 +255,6 @@ $root.Trace = (function() {
writer.uint32(/* id 21, wireType 0 =*/168).bool(message.persistedQueryHit);
if (message.persistedQueryRegister != null && Object.hasOwnProperty.call(message, "persistedQueryRegister"))
writer.uint32(/* id 22, wireType 0 =*/176).bool(message.persistedQueryRegister);
if (message.clientReferenceId != null && Object.hasOwnProperty.call(message, "clientReferenceId"))
writer.uint32(/* id 23, wireType 2 =*/186).string(message.clientReferenceId);
if (message.registeredOperation != null && Object.hasOwnProperty.call(message, "registeredOperation"))
writer.uint32(/* id 24, wireType 0 =*/192).bool(message.registeredOperation);
if (message.forbiddenOperation != null && Object.hasOwnProperty.call(message, "forbiddenOperation"))
Expand Down Expand Up @@ -343,9 +332,6 @@ $root.Trace = (function() {
case 9:
message.clientAddress = reader.string();
break;
case 23:
message.clientReferenceId = reader.string();
break;
case 10:
message.http = $root.Trace.HTTP.decode(reader, reader.uint32());
break;
Expand Down Expand Up @@ -446,9 +432,6 @@ $root.Trace = (function() {
if (message.clientAddress != null && message.hasOwnProperty("clientAddress"))
if (!$util.isString(message.clientAddress))
return "clientAddress: string expected";
if (message.clientReferenceId != null && message.hasOwnProperty("clientReferenceId"))
if (!$util.isString(message.clientReferenceId))
return "clientReferenceId: string expected";
if (message.http != null && message.hasOwnProperty("http")) {
var error = $root.Trace.HTTP.verify(message.http);
if (error)
Expand Down Expand Up @@ -514,7 +497,6 @@ $root.Trace = (function() {
object.fullQueryCacheHit = false;
object.persistedQueryHit = false;
object.persistedQueryRegister = false;
object.clientReferenceId = "";
object.registeredOperation = false;
object.forbiddenOperation = false;
object.queryPlan = null;
Expand Down Expand Up @@ -552,8 +534,6 @@ $root.Trace = (function() {
object.persistedQueryHit = message.persistedQueryHit;
if (message.persistedQueryRegister != null && message.hasOwnProperty("persistedQueryRegister"))
object.persistedQueryRegister = message.persistedQueryRegister;
if (message.clientReferenceId != null && message.hasOwnProperty("clientReferenceId"))
object.clientReferenceId = message.clientReferenceId;
if (message.registeredOperation != null && message.hasOwnProperty("registeredOperation"))
object.registeredOperation = message.registeredOperation;
if (message.forbiddenOperation != null && message.hasOwnProperty("forbiddenOperation"))
Expand Down Expand Up @@ -4910,7 +4890,6 @@ $root.StatsContext = (function() {
* Properties of a StatsContext.
* @exports IStatsContext
* @interface IStatsContext
* @property {string|null} [clientReferenceId] StatsContext clientReferenceId
* @property {string|null} [clientName] StatsContext clientName
* @property {string|null} [clientVersion] StatsContext clientVersion
*/
Expand All @@ -4930,14 +4909,6 @@ $root.StatsContext = (function() {
this[keys[i]] = properties[keys[i]];
}

/**
* StatsContext clientReferenceId.
* @member {string} clientReferenceId
* @memberof StatsContext
* @instance
*/
StatsContext.prototype.clientReferenceId = "";

/**
* StatsContext clientName.
* @member {string} clientName
Expand Down Expand Up @@ -4978,8 +4949,6 @@ $root.StatsContext = (function() {
StatsContext.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.clientReferenceId != null && Object.hasOwnProperty.call(message, "clientReferenceId"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientReferenceId);
if (message.clientName != null && Object.hasOwnProperty.call(message, "clientName"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientName);
if (message.clientVersion != null && Object.hasOwnProperty.call(message, "clientVersion"))
Expand Down Expand Up @@ -5018,9 +4987,6 @@ $root.StatsContext = (function() {
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.clientReferenceId = reader.string();
break;
case 2:
message.clientName = reader.string();
break;
Expand Down Expand Up @@ -5062,9 +5028,6 @@ $root.StatsContext = (function() {
StatsContext.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.clientReferenceId != null && message.hasOwnProperty("clientReferenceId"))
if (!$util.isString(message.clientReferenceId))
return "clientReferenceId: string expected";
if (message.clientName != null && message.hasOwnProperty("clientName"))
if (!$util.isString(message.clientName))
return "clientName: string expected";
Expand All @@ -5088,12 +5051,9 @@ $root.StatsContext = (function() {
options = {};
var object = {};
if (options.defaults) {
object.clientReferenceId = "";
object.clientName = "";
object.clientVersion = "";
}
if (message.clientReferenceId != null && message.hasOwnProperty("clientReferenceId"))
object.clientReferenceId = message.clientReferenceId;
if (message.clientName != null && message.hasOwnProperty("clientName"))
object.clientName = message.clientName;
if (message.clientVersion != null && message.hasOwnProperty("clientVersion"))
Expand Down
6 changes: 4 additions & 2 deletions packages/apollo-reporting-protobuf/generated/reports.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ message Trace {
string client_name = 7;
string client_version = 8;
string client_address = 9;
string client_reference_id = 23;
// string client_reference_id = 23;
reserved 23;

HTTP http = 10;

Expand Down Expand Up @@ -297,7 +298,8 @@ message QueryLatencyStats {
}

message StatsContext {
string client_reference_id = 1;
// string client_reference_id = 1;
reserved 1;
string client_name = 2;
string client_version = 3;
}
Expand Down
6 changes: 4 additions & 2 deletions packages/apollo-reporting-protobuf/src/reports.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ message Trace {
string client_name = 7;
string client_version = 8;
string client_address = 9;
string client_reference_id = 23;
// string client_reference_id = 23;
reserved 23;

HTTP http = 10;

Expand Down Expand Up @@ -297,7 +298,8 @@ message QueryLatencyStats {
}

message StatsContext {
string client_reference_id = 1;
// string client_reference_id = 1;
reserved 1;
string client_name = 2;
string client_version = 3;
}
Expand Down
Loading