File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/main/java/com/uid2/admin Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 4242import com .uid2 .shared .store .RotatingSaltProvider ;
4343import com .uid2 .shared .store .reader .*;
4444import com .uid2 .shared .store .scope .GlobalScope ;
45+ import com .uid2 .shared .util .HTTPPathMetricFilter ;
4546import com .uid2 .shared .vertx .VertxUtils ;
4647import io .micrometer .core .instrument .Gauge ;
4748import io .micrometer .core .instrument .MeterRegistry ;
@@ -422,13 +423,8 @@ private static void setupMetrics(MicrometerMetricsOptions metricOptions) {
422423 prometheusRegistry .config ()
423424 // providing common renaming for prometheus metric, e.g. "hello.world" to "hello_world"
424425 .meterFilter (new PrometheusRenameFilter ())
425- .meterFilter (MeterFilter .replaceTagValues (Label .HTTP_PATH .toString (), actualPath -> {
426- try {
427- return HttpUtils .normalizePath (actualPath ).split ("\\ ?" )[0 ];
428- } catch (IllegalArgumentException e ) {
429- return actualPath ;
430- }
431- }))
426+ .meterFilter (MeterFilter .replaceTagValues (Label .HTTP_PATH .toString (),
427+ actualPath -> HTTPPathMetricFilter .filterPath (actualPath , Set .of ())))
432428 // adding common labels
433429 .commonTags ("application" , "uid2-admin" );
434430
You can’t perform that action at this time.
0 commit comments