Restore high-cardinality Lettuce metrics for debugging
This commit is contained in:
parent
587c385936
commit
c5dc01ee11
|
@ -76,7 +76,7 @@ public class MetricsUtil {
|
|||
return defaultDistributionStatisticConfig.merge(config);
|
||||
}
|
||||
})
|
||||
// Remove high-cardinality `command` and `remote` tags from Lettuce metrics and prepend "chat." to meter names
|
||||
// Remove high-cardinality `command` tags from Lettuce metrics and prepend "chat." to meter names
|
||||
.meterFilter(new MeterFilter() {
|
||||
@Override
|
||||
public Meter.Id map(final Meter.Id id) {
|
||||
|
@ -84,7 +84,6 @@ public class MetricsUtil {
|
|||
return id.withName(PREFIX + "." + id.getName())
|
||||
.replaceTags(id.getTags().stream()
|
||||
.filter(tag -> !"command".equals(tag.getKey()))
|
||||
.filter(tag -> !"remote".equals(tag.getKey()))
|
||||
.toList());
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ class MetricsUtilTest {
|
|||
Meter meter = meters.get(0);
|
||||
assertThat(meter.getId().getName()).isEqualTo("chat.lettuce.command.completion.max");
|
||||
assertThat(meter.getId().getTag("command")).isNull();
|
||||
assertThat(meter.getId().getTag("remote")).isNull();
|
||||
assertThat(meter.getId().getTag("allowed")).isNotNull();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue