Skip to content

Commit

Permalink
deprecate IpcTagKey entries that are not in spec (#885)
Browse files Browse the repository at this point in the history
Consistency should be a high priority for the common IPC
metrics and we should discourage additions that are not
part of the [spec]. As a first step, the existing entries
for the IpcTagKey enum that are not in the spec have been
deprecated.

[spec]: https://netflix.github.io/spectator/en/latest/ext/ipc/
  • Loading branch information
brharrington committed May 21, 2021
1 parent 0682cc8 commit 38cbca9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,15 +641,11 @@ private Id createCallId(String name) {
putTag(tags, getAttemptFinal());

// Optional for client
putTag(tags, IpcTagKey.serverRegion.key(), serverRegion);
putTag(tags, IpcTagKey.serverZone.key(), serverZone);
putTag(tags, IpcTagKey.serverApp.key(), serverApp);
putTag(tags, IpcTagKey.serverCluster.key(), serverCluster);
putTag(tags, IpcTagKey.serverAsg.key(), serverAsg);
} else {
// Optional for server
putTag(tags, IpcTagKey.clientRegion.key(), clientRegion);
putTag(tags, IpcTagKey.clientZone.key(), clientZone);
putTag(tags, IpcTagKey.clientApp.key(), clientApp);
putTag(tags, IpcTagKey.clientCluster.key(), clientCluster);
putTag(tags, IpcTagKey.clientAsg.key(), clientAsg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@ public enum IpcTagKey {

/**
* Region where the client is located.
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
clientRegion("ipc.client.region"),

/**
* Availability zone where the client is located.
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
clientZone("ipc.client.zone"),

/**
Expand All @@ -130,12 +138,20 @@ public enum IpcTagKey {

/**
* Region where the server is located.
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
serverRegion("ipc.server.region"),

/**
* Availability zone where the server is located.
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
serverZone("ipc.server.zone"),

/**
Expand All @@ -156,12 +172,20 @@ public enum IpcTagKey {
/**
* Instance id for the server. <b>Do not use this unless you know it will not
* cause a metrics explosion. If there is any doubt, then do not enable it.</b>
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
serverNode("ipc.server.node"),

/**
* The port number connected to on the server.
*
* @deprecated Not included in the spec. Common IPC tags should bias towards consistency
* across integrations and only use tags that are part of the spec.
*/
@Deprecated
serverPort("ipc.server.port"),

/**
Expand Down

0 comments on commit 38cbca9

Please sign in to comment.