Class MetricParameters

java.lang.Object
google.registry.proxy.metric.MetricParameters

public class MetricParameters extends Object
Utility class to obtain labels for monitored resource of type gke_container.

Custom metrics collected by the proxy need to be associated with a MonitoredResource. When running on GKE, the type is gke_container. The labels for this type are used to group related metrics together, and to avoid out-of-order metrics writes. This class provides a map of the labels where the values are either read from environment variables (pod and container related labels) or queried from GCE metadata server (cluster and instance related labels).

See Also:
  • Method Details

    • makeLabelsMap

      public com.google.common.collect.ImmutableMap<String,String> makeLabelsMap()