Class MetricsManager

java.lang.Object
ai.vespa.metricsproxy.core.MetricsManager

public class MetricsManager extends Object
Retrieves metrics and performs necessary conversions and additions of metadata.
Author:
gjoranv
  • Constructor Details

  • Method Details

    • getMetricNamesForServiceAndConsumer

      public String getMetricNamesForServiceAndConsumer(String service, ConsumerId consumer)
      Returns all metrics for the given service that are whitelisted for the given consumer.
    • getMetricsByConfigId

      public String getMetricsByConfigId(String configId)
    • getMetrics

      public List<MetricsPacket> getMetrics(List<VespaService> services, Instant startTime)
      Returns the metrics for the given services. The empty list is returned if no services are given.
      Parameters:
      services - the services to retrieve metrics for
      Returns:
      metrics for all matching services
    • getMetrics

      public List<MetricsPacket> getMetrics(List<VespaService> services, Instant startTime, ConsumerId consumerId)
    • getMetricsAsBuilders

      public List<MetricsPacket.Builder> getMetricsAsBuilders(List<VespaService> services, Instant startTime, ConsumerId consumerId)
      Returns the metrics for the given services, in mutable state for further processing. NOTE: Use getMetrics(List, Instant) instead, unless further processing of the metrics is necessary.
    • getHealthMetrics

      public List<MetricsPacket> getHealthMetrics(List<VespaService> services)
      Returns the health metrics for the given services. The empty list is returned if no services are given.
      Parameters:
      services - The services to retrieve health metrics for.
      Returns:
      Health metrics for all matching services.
    • setExtraMetrics

      public void setExtraMetrics(List<MetricsPacket.Builder> packets)
    • getExtraDimensions

      public Map<DimensionId,String> getExtraDimensions()
    • purgeExtraMetrics

      public void purgeExtraMetrics()
    • getAllVespaServices

      public String getAllVespaServices()
      Returns a space separated list of all distinct service names.