mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 14:18:04 +01:00
Filter out command tags from Lettuce metrics and prepend a "chat." prefix to Lettuce metric names
This commit is contained in:
committed by
Jon Chambers
parent
25f759dd07
commit
8bf5ee45ed
@@ -63,6 +63,21 @@ public class MetricsUtil {
|
||||
}
|
||||
});
|
||||
|
||||
// Remove high-cardinality `command` tags from Lettuce metrics and prepend "chat." to meter names
|
||||
datadogMeterRegistry.config().meterFilter(new MeterFilter() {
|
||||
@Override
|
||||
public Meter.Id map(final Meter.Id id) {
|
||||
if (id.getName().startsWith("lettuce")) {
|
||||
return id.withName(PREFIX + "." + id.getName())
|
||||
.replaceTags(id.getTags().stream()
|
||||
.filter(tag -> !"command".equals(tag.getKey()))
|
||||
.toList());
|
||||
}
|
||||
|
||||
return MeterFilter.super.map(id);
|
||||
}
|
||||
});
|
||||
|
||||
Metrics.addRegistry(datadogMeterRegistry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user