From 268209c847df65a96e34464f89d6878dd5fe1234 Mon Sep 17 00:00:00 2001 From: jrhee17 Date: Mon, 26 Apr 2021 22:43:36 +0900 Subject: [PATCH] warn when the provided meterRegistry collides with clientFactory's --- .../client/armeria/legacy/LegacyCentralDogmaBuilder.java | 2 +- .../centraldogma/client/armeria/ArmeriaCentralDogmaBuilder.java | 2 +- .../centraldogma/client/AbstractCentralDogmaBuilder.java | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/java-armeria-legacy/src/main/java/com/linecorp/centraldogma/client/armeria/legacy/LegacyCentralDogmaBuilder.java b/client/java-armeria-legacy/src/main/java/com/linecorp/centraldogma/client/armeria/legacy/LegacyCentralDogmaBuilder.java index 05d6f0175b..c8a2718f69 100644 --- a/client/java-armeria-legacy/src/main/java/com/linecorp/centraldogma/client/armeria/legacy/LegacyCentralDogmaBuilder.java +++ b/client/java-armeria-legacy/src/main/java/com/linecorp/centraldogma/client/armeria/legacy/LegacyCentralDogmaBuilder.java @@ -76,7 +76,7 @@ public CentralDogma build() throws UnknownHostException { final MeterRegistry meterRegistry = meterRegistry().orElse(clientFactory().meterRegistry()); if (meterRegistry().isPresent() && meterRegistry().get() != clientFactory().meterRegistry()) { - logger.info("The specified meterRegistry differs from the meterRegistry from clientFactory."); + logger.warn("The specified meterRegistry differs from the meterRegistry from clientFactory."); } final CentralDogma dogma = new LegacyCentralDogma(executor, builder.build(AsyncIface.class), diff --git a/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogmaBuilder.java b/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogmaBuilder.java index af5a7e2105..118c966bac 100644 --- a/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogmaBuilder.java +++ b/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogmaBuilder.java @@ -54,7 +54,7 @@ public CentralDogma build() throws UnknownHostException { final MeterRegistry meterRegistry = meterRegistry().orElse(clientFactory().meterRegistry()); if (meterRegistry().isPresent() && meterRegistry().get() != clientFactory().meterRegistry()) { - logger.info("The specified meterRegistry differs from the meterRegistry from clientFactory."); + logger.warn("The specified meterRegistry differs from the meterRegistry from clientFactory."); } final CentralDogma dogma = new ArmeriaCentralDogma(executor, diff --git a/client/java/src/main/java/com/linecorp/centraldogma/client/AbstractCentralDogmaBuilder.java b/client/java/src/main/java/com/linecorp/centraldogma/client/AbstractCentralDogmaBuilder.java index e649ca96e4..d7655603ab 100644 --- a/client/java/src/main/java/com/linecorp/centraldogma/client/AbstractCentralDogmaBuilder.java +++ b/client/java/src/main/java/com/linecorp/centraldogma/client/AbstractCentralDogmaBuilder.java @@ -48,7 +48,6 @@ import com.linecorp.centraldogma.internal.CsrfToken; import io.micrometer.core.instrument.MeterRegistry; -import io.micrometer.core.instrument.Metrics; /** * Builds a {@link CentralDogma} client.