Remove Lettuce command latency recorder

This commit is contained in:
Chris Eager
2023-02-23 09:00:10 -06:00
committed by Chris Eager
parent d7ad8dd448
commit e1fcd3e3f6
2 changed files with 1 additions and 36 deletions

View File

@@ -1,29 +0,0 @@
/*
* Copyright 2022 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.metrics;
import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.config.MeterFilter;
public class LettuceMetricsMeterFilter implements MeterFilter {
private static final String METRIC_NAME_PREFIX = "lettuce.command";
private static final String REMOTE_TAG = "remote";
// the `remote` tag is very high-cardinality, so we ignore it.
// In the future, it would be nice to map a remote (address:port) to a logical cluster name
private static final MeterFilter IGNORE_TAGS_FILTER = MeterFilter.ignoreTags(REMOTE_TAG);
@Override
public Meter.Id map(final Meter.Id id) {
if (id.getName().startsWith(METRIC_NAME_PREFIX)) {
return IGNORE_TAGS_FILTER.map(id);
}
return id;
}
}