Skip to content

Commit b904a82

Browse files
author
Fran Garcia
committed
Remove unused metric
For rediscluster we can't easily calculate the size of the pool since counting the number of items in the queue doesn't work (the queue is always full, just full of Nones if the queue is "empty"). We just decide to ignore that metric for now and just report the ones that are easily available to us.
1 parent 024adff commit b904a82

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

baseplate/clients/redis_cluster.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,9 @@ def report_runtime_metrics(self, batch: metrics.Client) -> None:
137137

138138
size = self.connection_pool.max_connections
139139
open_connections = len(self.connection_pool._connections)
140-
available = self.connection_pool.pool.qsize()
141-
in_use = size - available
142140

143141
batch.gauge("pool.size").replace(size)
144-
batch.gauge("pool.in_use").replace(in_use)
145-
batch.gauge("pool.open_and_available").replace(open_connections - in_use)
142+
batch.gauge("pool.open_connections").replace(open_connections)
146143

147144
def make_object_for_context(self, name: str, span: Span) -> "MonitoredClusterRedisConnection":
148145
return MonitoredClusterRedisConnection(name, span, self.connection_pool)

0 commit comments

Comments
 (0)