MetricsHelper { public static Counter recordHttpClientError(String tenant, String httpMethod, String urlPath) { if (!enabled) { return null; } Counter counter = Counter.builder(METRICS_HTTP_CLIENT_ERRORS) .tag(TAG_TENANT, tenant) .tag(TAG_METHOD, httpMethod) .tag(TAG_URL, urlPath) .register(getRegistry()); counter.increment(); return counter; } private  MetricsHelper(); static void config(VertxOptions vertxOptions, String influxUrl,
      String influxDbName, String influxUserName, String influxPassword); static Sample getTimerSample(); static Timer recordHttpServerProcessingTime(Sample sample, String tenant,
      int httpStatusCode, String httpMethod, ModuleInstance moduleInstance); static Timer recordHttpClientResponse(Sample sample, String tenant, int httpStatusCode,
      String httpMethod, ModuleInstance moduleInstance); static Counter recordHttpClientError(String tenant, String httpMethod, String urlPath); static boolean isEnabled(); static void setEnabled(boolean enabled);  }
@Test void testRecordHttpClientError() { Counter counter = MetricsHelper.recordHttpClientError("a", "GET", "/a"); assertEquals(1, counter.count()); MetricsHelper.recordHttpClientError("a", "GET", "/a"); assertEquals(2, counter.count()); }