mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 21:18:08 +01:00
keep lettuce metrics; strip remote tags
This commit is contained in:
committed by
ravi-signal
parent
eeea97e2fe
commit
17d48b95ac
@@ -77,7 +77,7 @@ public class MetricsUtil {
|
||||
return defaultDistributionStatisticConfig.merge(config);
|
||||
}
|
||||
})
|
||||
// Remove high-cardinality `command` tags from Lettuce metrics and prepend "chat." to meter names
|
||||
// Remove high-cardinality `command` and `remote` tags from Lettuce metrics and prepend "chat." to meter names
|
||||
.meterFilter(new MeterFilter() {
|
||||
@Override
|
||||
public Meter.Id map(final Meter.Id id) {
|
||||
@@ -85,17 +85,13 @@ 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());
|
||||
}
|
||||
|
||||
return MeterFilter.super.map(id);
|
||||
}
|
||||
})
|
||||
// Deny lettuce metrics, but leave command.completions.max. Note that regardless of configured order, accept
|
||||
// filters are applied after map filters.
|
||||
.meterFilter(MeterFilter.deny(id ->
|
||||
id.getName().startsWith(PREFIX + ".lettuce") && !id.getName().contains("command.completion.max")
|
||||
))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(PushLatencyManager.TIMER_NAME + ".percentile"))
|
||||
.meterFilter(MeterFilter.denyNameStartsWith(MessageMetrics.DELIVERY_LATENCY_TIMER_NAME + ".percentile"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user