File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
src/main/java/com/uid2/optout Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1616 <vertx .version>4.5.11</vertx .version>
1717 <!-- check micrometer.version vertx-micrometer-metrics consumes before bumping up -->
1818 <micrometer .version>1.1.0</micrometer .version>
19- <uid2-shared .version>8.0.6 </uid2-shared .version>
19+ <uid2-shared .version>8.0.32 </uid2-shared .version>
2020 <image .version>${project.version} </image .version>
2121 <junit-jupiter .version>5.10.1</junit-jupiter .version>
2222 <junit-vintage .version>5.10.1</junit-vintage .version>
Original file line number Diff line number Diff line change 1717import com .uid2 .shared .vertx .CloudSyncVerticle ;
1818import com .uid2 .shared .vertx .RotatingStoreVerticle ;
1919import com .uid2 .shared .vertx .VertxUtils ;
20+ import com .uid2 .shared .util .HTTPPathMetricFilter ;
2021import io .micrometer .core .instrument .Gauge ;
2122import io .micrometer .core .instrument .Metrics ;
2223import io .micrometer .core .instrument .config .MeterFilter ;
@@ -218,14 +219,8 @@ private static void setupMetrics(MicrometerMetricsOptions metricOptions) {
218219 prometheusRegistry .config ()
219220 // providing common renaming for prometheus metric, e.g. "hello.world" to "hello_world"
220221 .meterFilter (new PrometheusRenameFilter ())
221- .meterFilter (MeterFilter .replaceTagValues (Label .HTTP_PATH .toString (), actualPath -> {
222- try {
223- String normalized = HttpUtils .normalizePath (actualPath ).split ("\\ ?" )[0 ];
224- return Endpoints .pathSet ().contains (normalized ) ? normalized : "/unknown" ;
225- } catch (IllegalArgumentException e ) {
226- return actualPath ;
227- }
228- }))
222+ .meterFilter (MeterFilter .replaceTagValues (Label .HTTP_PATH .toString (),
223+ actualPath -> HTTPPathMetricFilter .filterPath (actualPath , Endpoints .pathSet ())))
229224 // Don't record metrics for 404s.
230225 .meterFilter (MeterFilter .deny (id ->
231226 id .getName ().startsWith (MetricsDomain .HTTP_SERVER .getPrefix ()) &&
You can’t perform that action at this time.
0 commit comments