Skip to content

Commit

Permalink
fix metrics with same names being created in the same metrics instance
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima committed Jan 14, 2025
1 parent 788d0fd commit a4e626e
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,24 @@
import org.hyperledger.besu.metrics.ObservableMetricsSystem;
import org.hyperledger.besu.metrics.Observation;
import org.hyperledger.besu.metrics.prometheus.PrometheusMetricsSystem;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

class MetricsHistogramTest {

private static final TekuMetricCategory CATEGORY = TekuMetricCategory.BEACON;
private final ObservableMetricsSystem metricsSystem =
new PrometheusMetricsSystem(Set.of(CATEGORY), true);
private ObservableMetricsSystem metricsSystem;

@BeforeEach
void setup() {
metricsSystem = new PrometheusMetricsSystem(Set.of(CATEGORY), true);
}

@AfterEach
void shutdown() {
metricsSystem.shutdown();
}

@Test
void shouldReportValuesWithNoSpecifiedUpperLimit() {
Expand Down

0 comments on commit a4e626e

Please sign in to comment.