Skip to content

Commit

Permalink
DRY out sting naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugh Sutton-Gee committed Dec 19, 2024
1 parent 4e5025d commit d4a02d3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public class MetaDataHandler extends SimpleChannelInboundHandler<HttpRequest> {
static final String REQUEST_BLOB_DISCOVERY_ERROR_PUSH_STORE =
"Blob Discovery: failed to get the live node hostNames for store:%s version:%s partition:%s";
private final VeniceVersionFinder veniceVersionFinder;

private final MetricsRepository metricsRepository;

public MetaDataHandler(
Expand Down Expand Up @@ -485,8 +484,9 @@ private void handleD2ServiceLookup(ChannelHandlerContext ctx, VenicePathParserHe
}

// Only create metrics for valid stores
Sensor d2DiscoverySensor = metricsRepository.sensor(String.format("venice.router.d2_discovery.%s", storeName));
d2DiscoverySensor.add(String.format("venice.router.d2_discovery.%s.request.count", storeName), new Count());
String d2DiscoveryMetricName = "venice.router.d2_discovery." + storeName;
Sensor d2DiscoverySensor = metricsRepository.sensor(d2DiscoveryMetricName);
d2DiscoverySensor.add(d2DiscoveryMetricName + ".request.count", new Count());
d2DiscoverySensor.record();

String clusterName = config.get().getCluster();
Expand Down

0 comments on commit d4a02d3

Please sign in to comment.