diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/NoTagsMeterFilter.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/NoTagsMeterFilter.java index 95b1f30af77a..d2011eb3199d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/NoTagsMeterFilter.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/NoTagsMeterFilter.java @@ -4,13 +4,27 @@ import io.micrometer.core.instrument.Tags; import io.micrometer.core.instrument.config.MeterFilter; +import java.util.List; + public class NoTagsMeterFilter implements MeterFilter { + private static final List seriesExceptionList = List.of( + "appsmith.total.plugin.execution", "appsmith.total.server.execution", "appsmith.get.datasource.context"); + @Override public Meter.Id map(Meter.Id id) { // Remove all tags from the metric - if (id.getName().startsWith("appsmith")) { + if (id.getName().startsWith("appsmith") && !startsWithPrefix(id.getName())) { return id.replaceTags(Tags.empty()); } return id; } + + private boolean startsWithPrefix(String metricName) { + for (String prefix : seriesExceptionList) { + if (metricName.startsWith(prefix)) { + return true; + } + } + return false; + } }