Restore high-cardinality Lettuce metrics for debugging

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2024-02-08 19:27:56 -05:00
1 parent 587c385936
commit c5dc01ee11
2 files changed
+1 -3

No files matched your search

@@ -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();
}
}