Skip to content

Commit

Permalink
[#11192] Bump dropwizard-metrics from 3.2.6 to 4.2.26
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Jun 27, 2024
1 parent 75c30a4 commit d2e97b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
4 changes: 4 additions & 0 deletions collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jvm</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jmx</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-servlets</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

package com.navercorp.pinpoint.collector.monitor;

import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.JvmAttributeGaugeSet;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Reporter;
import com.codahale.metrics.Slf4jReporter;
import com.codahale.metrics.jmx.JmxReporter;
import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
import com.codahale.metrics.jvm.JvmAttributeGaugeSet;
import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
import com.navercorp.pinpoint.collector.config.CollectorProperties;
Expand Down Expand Up @@ -60,7 +59,7 @@ public class CollectorMetric {
private final HBaseAsyncOperationMetrics hBaseAsyncOperationMetrics;
private final BulkOperationMetrics bulkOperationMetrics;

private List<Reporter> reporterList = new ArrayList<>(2);
private List<Closeable> reporterList = new ArrayList<>(2);

private final boolean isEnable = isEnable0(REPORTER_LOGGER_NAME);

Expand Down Expand Up @@ -156,10 +155,8 @@ private JmxReporter createJmxReporter(String metricJmxDomainName) {

@PreDestroy
private void shutdown() {
for (Reporter reporter : reporterList) {
if (reporter instanceof Closeable closeable) {
IOUtils.closeQuietly(closeable);
}
for (Closeable reporter : reporterList) {
IOUtils.closeQuietly(reporter);
}
reporterList = null;
}
Expand Down
24 changes: 5 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<plugin.jacoco.skip>true</plugin.jacoco.skip>

<!-- library -->
<metrics.version>3.2.6</metrics.version>
<dropwizard-metrics.version>4.2.26</dropwizard-metrics.version>

<mysql-connector-java.verison>8.0.28</mysql-connector-java.verison>

Expand Down Expand Up @@ -881,24 +881,10 @@
<!-- serving performance metrics -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>${metrics.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jvm</artifactId>
<version>${metrics.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-servlets</artifactId>
<version>${metrics.version}</version>
<exclusions>
<exclusion>
<groupId>com.papertrail</groupId>
<artifactId>profiler</artifactId>
</exclusion>
</exclusions>
<artifactId>metrics-bom</artifactId>
<version>${dropwizard-metrics.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
Expand Down

0 comments on commit d2e97b0

Please sign in to comment.