Skip to content

Commit

Permalink
trim help strings to save a few bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkcp committed Nov 16, 2020
1 parent 3966ecb commit 15af5ea
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 86 deletions.
46 changes: 23 additions & 23 deletions agent/catalog_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,87 +18,87 @@ var CatalogCounters = []prometheus.CounterDefinition{
},
{
Name: []string{"client", "rpc", "error", "catalog_register"},
Help: "This increments whenever a Consul agent receives an RPC error for a catalog register request.",
Help: "Increments whenever a Consul agent receives an RPC error for a catalog register request.",

This comment has been minimized.

Copy link
@dnephin

dnephin Nov 16, 2020

Contributor

Nice! This bothered me too when I was reading over the telemetry docs. Much better without all the "this".

},
{
Name: []string{"client", "api", "success", "catalog_register"},
Help: "This increments whenever a Consul agent successfully responds to a catalog register request.",
Help: "Increments whenever a Consul agent successfully responds to a catalog register request.",
},
{
Name: []string{"client", "api", "catalog_deregister"},
Help: "This increments whenever a Consul agent receives a catalog deregister request.",
Help: "Increments whenever a Consul agent receives a catalog deregister request.",
},
{
Name: []string{"client", "api", "catalog_datacenters"},
Help: "This increments whenever a Consul agent receives a request to list datacenters in the catalog.",
Help: "Increments whenever a Consul agent receives a request to list datacenters in the catalog.",
},
{
Name: []string{"client", "rpc", "error", "catalog_deregister"},
Help: "This increments whenever a Consul agent receives an RPC error for a catalog deregister request.",
Help: "Increments whenever a Consul agent receives an RPC error for a catalog deregister request.",
},
{
Name: []string{"client", "api", "success", "catalog_nodes"},
Help: "This increments whenever a Consul agent successfully responds to a request to list nodes.",
Help: "Increments whenever a Consul agent successfully responds to a request to list nodes.",
},
{
Name: []string{"client", "rpc", "error", "catalog_nodes"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list nodes.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list nodes.",
},
{
Name: []string{"client", "api", "success", "catalog_deregister"},
Help: "This increments whenever a Consul agent successfully responds to a catalog deregister request.",
Help: "Increments whenever a Consul agent successfully responds to a catalog deregister request.",
},
{
Name: []string{"client", "rpc", "error", "catalog_datacenters"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list datacenters.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list datacenters.",
},
{
Name: []string{"client", "api", "success", "catalog_datacenters"},
Help: "This increments whenever a Consul agent successfully responds to a request to list datacenters.",
Help: "Increments whenever a Consul agent successfully responds to a request to list datacenters.",
},
{
Name: []string{"client", "api", "catalog_nodes"},
Help: "This increments whenever a Consul agent receives a request to list nodes from the catalog.",
Help: "Increments whenever a Consul agent receives a request to list nodes from the catalog.",
},
{
Name: []string{"client", "api", "catalog_services"},
Help: "This increments whenever a Consul agent receives a request to list services from the catalog.",
Help: "Increments whenever a Consul agent receives a request to list services from the catalog.",
},
{
Name: []string{"client", "rpc", "error", "catalog_services"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list services.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list services.",
},
{
Name: []string{"client", "api", "success", "catalog_services"},
Help: "This increments whenever a Consul agent successfully responds to a request to list services.",
Help: "Increments whenever a Consul agent successfully responds to a request to list services.",
},
{
Name: []string{"client", "api", "catalog_service_nodes"},
Help: "This increments whenever a Consul agent receives a request to list nodes offering a service.",
Help: "Increments whenever a Consul agent receives a request to list nodes offering a service.",
},
{
Name: []string{"client", "rpc", "error", "catalog_service_nodes"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list nodes offering a service.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list nodes offering a service.",
},
{
Name: []string{"client", "api", "success", "catalog_service_nodes"},
Help: "This increments whenever a Consul agent successfully responds to a request to list nodes offering a service.",
Help: "Increments whenever a Consul agent successfully responds to a request to list nodes offering a service.",
},
{
Name: []string{"client", "api", "error", "catalog_service_nodes"},
Help: "",
},
{
Name: []string{"client", "api", "catalog_node_services"},
Help: "This increments whenever a Consul agent successfully responds to a request to list nodes offering a service.",
Help: "Increments whenever a Consul agent successfully responds to a request to list nodes offering a service.",
},
{
Name: []string{"client", "api", "success", "catalog_node_services"},
Help: "This increments whenever a Consul agent successfully responds to a request to list services in a node.",
Help: "Increments whenever a Consul agent successfully responds to a request to list services in a node.",
},
{
Name: []string{"client", "rpc", "error", "catalog_node_services"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list services in a node.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list services in a node.",
},
{
Name: []string{"client", "api", "catalog_node_service_list"},
Expand All @@ -114,15 +114,15 @@ var CatalogCounters = []prometheus.CounterDefinition{
},
{
Name: []string{"client", "api", "catalog_gateway_services"},
Help: "This increments whenever a Consul agent receives a request to list services associated with a gateway.",
Help: "Increments whenever a Consul agent receives a request to list services associated with a gateway.",
},
{
Name: []string{"client", "rpc", "error", "catalog_gateway_services"},
Help: "This increments whenever a Consul agent receives an RPC error for a request to list services associated with a gateway.",
Help: "Increments whenever a Consul agent receives an RPC error for a request to list services associated with a gateway.",
},
{
Name: []string{"client", "api", "success", "catalog_gateway_services"},
Help: "This increments whenever a Consul agent successfully responds to a request to list services associated with a gateway.",
Help: "Increments whenever a Consul agent successfully responds to a request to list services associated with a gateway.",
},
}

Expand Down
2 changes: 1 addition & 1 deletion agent/consul/acl_endpoint_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
var ACLEndpointLegacySummaries = []prometheus.SummaryDefinition{
{
Name: []string{"acl", "apply"},
Help: "This measures the time it takes to complete an update to the ACL store.",
Help: "Measures the time it takes to complete an update to the ACL store.",
},
}

Expand Down
4 changes: 2 additions & 2 deletions agent/consul/autopilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
var AutopilotGauges = []prometheus.GaugeDefinition{
{
Name: []string{"autopilot", "failure_tolerance"},
Help: "This tracks the number of voting servers that the cluster can lose while continuing to function.",
Help: "Tracks the number of voting servers that the cluster can lose while continuing to function.",
},
{
Name: []string{"autopilot", "healthy"},
Help: "This tracks the overall health of the local server cluster. 1 if all servers are healthy, 0 if one or more are unhealthy.",
Help: "Tracks the overall health of the local server cluster. 1 if all servers are healthy, 0 if one or more are unhealthy.",
},
}

Expand Down
12 changes: 6 additions & 6 deletions agent/consul/catalog_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ import (
var CatalogCounters = []prometheus.CounterDefinition{
{
Name: []string{"catalog", "service", "query"},
Help: "This increments for each catalog query for the given service.",
Help: "Increments for each catalog query for the given service.",
},
{
Name: []string{"catalog", "connect", "query"},
Help: "",
},
{
Name: []string{"catalog", "service", "query-tag"},
Help: "This increments for each catalog query for the given service with the given tag.",
Help: "Increments for each catalog query for the given service with the given tag.",
},
{
Name: []string{"catalog", "connect", "query-tag"},
Help: "",
},
{
Name: []string{"catalog", "service", "query-tags"},
Help: "This increments for each catalog query for the given service with the given tags.",
Help: "Increments for each catalog query for the given service with the given tags.",
},
{
Name: []string{"catalog", "connect", "query-tags"},
Help: "",
},
{
Name: []string{"catalog", "service", "not-found"},
Help: "This increments for each catalog query where the given service could not be found.",
Help: "Increments for each catalog query where the given service could not be found.",
},
{
Name: []string{"catalog", "connect", "not-found"},
Expand All @@ -56,11 +56,11 @@ var CatalogCounters = []prometheus.CounterDefinition{
var CatalogSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"catalog", "deregister"},
Help: "This measures the time it takes to complete a catalog deregister operation.",
Help: "Measures the time it takes to complete a catalog deregister operation.",
},
{
Name: []string{"catalog", "register"},
Help: "This measures the time it takes to complete a catalog register operation.",
Help: "Measures the time it takes to complete a catalog register operation.",
},
}

Expand Down
20 changes: 10 additions & 10 deletions agent/consul/fsm/commands_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,43 @@ import (
var CommandsSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"fsm", "register"},
Help: "This measures the time it takes to apply a catalog register operation to the FSM.",
Help: "Measures the time it takes to apply a catalog register operation to the FSM.",
},
{
Name: []string{"fsm", "deregister"},
Help: "This measures the time it takes to apply a catalog deregister operation to the FSM.",
Help: "Measures the time it takes to apply a catalog deregister operation to the FSM.",
},
{
Name: []string{"fsm", "kvs"},
Help: "This measures the time it takes to apply the given KV operation to the FSM.",
Help: "Measures the time it takes to apply the given KV operation to the FSM.",
},
{
Name: []string{"fsm", "session"},
Help: "This measures the time it takes to apply the given session operation to the FSM.",
Help: "Measures the time it takes to apply the given session operation to the FSM.",
},
{
Name: []string{"fsm", "acl"},
Help: "This measures the time it takes to apply the given ACL operation to the FSM.",
Help: "Measures the time it takes to apply the given ACL operation to the FSM.",
},
{
Name: []string{"fsm", "tombstone"},
Help: "This measures the time it takes to apply the given tombstone operation to the FSM.",
Help: "Measures the time it takes to apply the given tombstone operation to the FSM.",
},
{
Name: []string{"fsm", "coordinate", "batch-update"},
Help: "This measures the time it takes to apply the given batch coordinate update to the FSM.",
Help: "Measures the time it takes to apply the given batch coordinate update to the FSM.",
},
{
Name: []string{"fsm", "prepared-query"},
Help: "This measures the time it takes to apply the given prepared query update operation to the FSM.",
Help: "Measures the time it takes to apply the given prepared query update operation to the FSM.",
},
{
Name: []string{"fsm", "txn"},
Help: "This measures the time it takes to apply the given transaction update to the FSM.",
Help: "Measures the time it takes to apply the given transaction update to the FSM.",
},
{
Name: []string{"fsm", "autopilot"},
Help: "This measures the time it takes to apply the given autopilot update to the FSM.",
Help: "Measures the time it takes to apply the given autopilot update to the FSM.",
},
{
Name: []string{"consul", "fsm", "intention"},
Expand Down
2 changes: 1 addition & 1 deletion agent/consul/fsm/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
var SnapshotSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"fsm", "persist"},
Help: "This measures the time it takes to persist the FSM to a raft snapshot.",
Help: "Measures the time it takes to persist the FSM to a raft snapshot.",
},
}

Expand Down
2 changes: 1 addition & 1 deletion agent/consul/kvs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
var KVSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"kvs", "apply"},
Help: "This measures the time it takes to complete an update to the KV store.",
Help: "Measures the time it takes to complete an update to the KV store.",
},
}

Expand Down
6 changes: 3 additions & 3 deletions agent/consul/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ import (
var LeaderSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"leader", "barrier"},
Help: "This measures the time spent waiting for the raft barrier upon gaining leadership.",
Help: "Measures the time spent waiting for the raft barrier upon gaining leadership.",
},
{
Name: []string{"leader", "reconcileMember"},
Help: "This measures the time spent updating the raft store for a single serf member's information.",
Help: "Measures the time spent updating the raft store for a single serf member's information.",
},
{
Name: []string{"leader", "reapTombstones"},
Help: "This measures the time spent clearing tombstones.",
Help: "Measures the time spent clearing tombstones.",
},
}

Expand Down
8 changes: 4 additions & 4 deletions agent/consul/prepared_query_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ import (
var PreparedQuerySummaries = []prometheus.SummaryDefinition{
{
Name: []string{"prepared-query", "apply"},
Help: "This measures the time it takes to apply a prepared query update.",
Help: "Measures the time it takes to apply a prepared query update.",
},
{
Name: []string{"prepared-query", "explain"},
Help: "This measures the time it takes to process a prepared query explain request.",
Help: "Measures the time it takes to process a prepared query explain request.",
},
{
Name: []string{"prepared-query", "execute"},
Help: "This measures the time it takes to process a prepared query execute request.",
Help: "Measures the time it takes to process a prepared query execute request.",
},
{
Name: []string{"prepared-query", "execute_remote"},
Help: "This measures the time it takes to process a prepared query execute request that was forwarded to another datacenter.",
Help: "Measures the time it takes to process a prepared query execute request that was forwarded to another datacenter.",
},
}

Expand Down
16 changes: 8 additions & 8 deletions agent/consul/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,41 @@ import (
var RPCCounters = []prometheus.CounterDefinition{
{
Name: []string{"rpc", "accept_conn"},
Help: "This increments when a server accepts an RPC connection.",
Help: "Increments when a server accepts an RPC connection.",
},
{
Name: []string{"rpc", "raft_handoff"},
Help: "This increments when a server accepts a Raft-related RPC connection.",
Help: "Increments when a server accepts a Raft-related RPC connection.",
},
{
Name: []string{"rpc", "request_error"},
Help: "This increments when a server returns an error from an RPC request.",
Help: "Increments when a server returns an error from an RPC request.",
},
{
Name: []string{"rpc", "request"},
Help: "This increments when a server receives a Consul-related RPC request.",
Help: "Increments when a server receives a Consul-related RPC request.",
},
{
Name: []string{"rpc", "cross-dc"},
Help: "This increments when a server sends a (potentially blocking) cross datacenter RPC query.",
Help: "Increments when a server sends a (potentially blocking) cross datacenter RPC query.",
},
{
Name: []string{"rpc", "query"},
Help: "This increments when a server receives a new blocking RPC request, indicating the rate of new blocking query calls.",
Help: "Increments when a server receives a new blocking RPC request, indicating the rate of new blocking query calls.",
},
}

var RPCGauges = []prometheus.GaugeDefinition{
{
Name: []string{"rpc", "queries_blocking"},
Help: "This shows the current number of in-flight blocking queries the server is handling.",
Help: "Shows the current number of in-flight blocking queries the server is handling.",
},
}

var RPCSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"rpc", "consistentRead"},
Help: "This measures the time spent confirming that a consistent read can be performed.",
Help: "Measures the time spent confirming that a consistent read can be performed.",
},
}

Expand Down
2 changes: 1 addition & 1 deletion agent/consul/segment_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
var SegmentOSSSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"leader", "reconcile"},
Help: "This measures the time spent updating the raft store from the serf member information.",
Help: "Measures the time spent updating the raft store from the serf member information.",
},
}

Expand Down
4 changes: 2 additions & 2 deletions agent/consul/session_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
var SessionEndpointSummaries = []prometheus.SummaryDefinition{
{
Name: []string{"session", "apply"},
Help: "This measures the time spent applying a session update.",
Help: "Measures the time spent applying a session update.",
},
{
Name: []string{"session", "renew"},
Help: "This measures the time spent renewing a session.",
Help: "Measures the time spent renewing a session.",
},
}

Expand Down
Loading

0 comments on commit 15af5ea

Please sign in to comment.