/**
 * Copyright 2020 LinkedIn Corp. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 */

package com.github.ambry.network.http2;

import com.codahale.metrics.Counter;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.MetricRegistry;


/**
 * Metrics for HTTP/2 Client
 */
public class Http2ServerMetrics {

  public final Histogram requestEnqueueTime;
  public final Histogram requestQueuingTime;
  public final Histogram requestTotalProcessingTime;

  public final Counter requestResponseChannelErrorCount;
  public final Counter http2ParentExceptionCount;
  public final Counter http2StreamExceptionCount;

  public Http2ServerMetrics(MetricRegistry registry) {
    requestEnqueueTime = registry.histogram(MetricRegistry.name(Http2NetworkClient.class, "RequestEnqueueTime"));
    requestQueuingTime = registry.histogram(MetricRegistry.name(Http2NetworkClient.class, "RequestQueuingTime"));
    requestTotalProcessingTime =
        registry.histogram(MetricRegistry.name(Http2NetworkClient.class, "RequestTotalProcessingTime"));

    requestResponseChannelErrorCount =
        registry.counter(MetricRegistry.name(Http2NetworkClient.class, "RequestResponseChannelErrorCount"));
    http2ParentExceptionCount =
        registry.counter(MetricRegistry.name(Http2NetworkClient.class, "Http2ParentExceptionCount"));
    http2StreamExceptionCount =
        registry.counter(MetricRegistry.name(Http2NetworkClient.class, "Http2StreamExceptionCount"));
  }
}

@@ -1162,37 +1162,37 @@
 y.name(Http2
-NetworkClient
+ServerMetrics
 .class, %22Req
@@ -1276,37 +1276,37 @@
 y.name(Http2
-NetworkClient
+ServerMetrics
 .class, %22Req
@@ -1406,37 +1406,37 @@
 y.name(Http2
-NetworkClient
+ServerMetrics
 .class, %22Req
@@ -1549,37 +1549,37 @@
 y.name(Http2
-NetworkClient
+ServerMetrics
 .class, %22Req
@@ -1690,37 +1690,37 @@
 y.name(Http2
-NetworkClient
+ServerMetrics
 .class, %22Htt
@@ -1832,21 +1832,21 @@
 ttp2
-NetworkClient
+ServerMetrics
 .cla

Change http2 server metric registry class (#1572)