From a6f0ab1429f9063b023106f0b21cec23833ed3a8 Mon Sep 17 00:00:00 2001 From: jianglai Date: Fri, 3 Nov 2017 14:23:37 -0700 Subject: [PATCH] Collect proxy backend metrics The metrics are collected in a new handler (BackendMetricsHandler), which gets outbound FullHttpRequest and inbound FullHttpResponse. All metrics collected here are backend metrics, i. e. metrics about connection between the proxy and GAE. They also corresponds to the metrics that we are correctly collection from the [] proxy, minus a few that are related to quota management, which are yet to be implemented. This CL also removed some unnecessary steps to write the frontend protocol name and client hash certificate into backend channel attributes. Instead, BackendMetricsHandler will read these information from the frontend channel attributes directly. This is because backend channel is established after frontend channel, and reading frontend channel attributes from backend handlers always works. On the other hand, there is no easy way to guarantee that the backend channel attributes are writable from frontend handlers, because the channel itself may not have been fully established. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=174513334 --- .../metrics/contrib/DistributionMetricSubject.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/google/registry/monitoring/metrics/contrib/DistributionMetricSubject.java b/java/google/registry/monitoring/metrics/contrib/DistributionMetricSubject.java index 2c03ac5be..635d64539 100644 --- a/java/google/registry/monitoring/metrics/contrib/DistributionMetricSubject.java +++ b/java/google/registry/monitoring/metrics/contrib/DistributionMetricSubject.java @@ -105,10 +105,10 @@ public final class DistributionMetricSubject /** * Asserts that the distribution for the given label can be constructed from the given data set. * - *

Note that this only tests that the distribution has the same binned histogram as it would if - * it had recorded the specified data points. It could have in fact collected different data - * points that resulted in the same histogram, but that information is lost to us and cannot be - * tested. + *

Note that this only tests that the distribution has the same binned histogram, along with + * the same mean, and sum of squared deviation as it would if it had recorded the specified data + * points. It could have in fact collected different data points that resulted in the same + * distribution, but that information is lost to us and cannot be tested. */ public And hasDataSetForLabels( ImmutableSet dataSet, String... labels) {