Class VeniceMetricsConfig

java.lang.Object
com.linkedin.venice.stats.VeniceMetricsConfig

public class VeniceMetricsConfig extends Object
Configuration for metrics emitted by Venice: Holds OpenTelemetry as well as Tehuti configs
Configs starting with "otel.venice." are venice specific configs for OpenTelemetry metrics
other configs starting with "otel.exporter." are generic OpenTelemetry exporter configs but are parsed in this class and used setters to configure otel exporter.
  • Field Details

    • OTEL_VENICE_METRICS_ENABLED

      public static final String OTEL_VENICE_METRICS_ENABLED
      Config to enable OpenTelemetry metrics
      See Also:
    • OTEL_VENICE_METRICS_PREFIX

      public static final String OTEL_VENICE_METRICS_PREFIX
      Config to set the metric prefix for OpenTelemetry metrics
      See Also:
    • OTEL_VENICE_METRICS_NAMING_FORMAT

      public static final String OTEL_VENICE_METRICS_NAMING_FORMAT
      Config to set the naming format for OpenTelemetry metrics VeniceOpenTelemetryMetricNamingFormat
      See Also:
    • OTEL_VENICE_METRICS_EXPORT_TO_LOG

      public static final String OTEL_VENICE_METRICS_EXPORT_TO_LOG
      Export opentelemetry metrics to a log exporter VeniceOpenTelemetryMetricsRepository.LogBasedMetricExporter
      See Also:
    • OTEL_VENICE_METRICS_EXPORT_TO_ENDPOINT

      public static final String OTEL_VENICE_METRICS_EXPORT_TO_ENDPOINT
      See Also:
    • OTEL_VENICE_METRICS_CUSTOM_DIMENSIONS_MAP

      public static final String OTEL_VENICE_METRICS_CUSTOM_DIMENSIONS_MAP
      Config Map to add custom dimensions to the metrics: Can be used for system dimensions amongst other custom dimensions
      These will be emitted along with all the metrics emitted. custom dimensions are passed as key=value pairs separated by '=' Multiple headers are separated by ',' For example: "custom_dimension_one=value1,custom_dimension_two=value2,custom_dimension_three=value3"
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_PROTOCOL

      public static final String OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
      Protocol over which the metrics are exported to OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
      1. OtlpConfigUtil.PROTOCOL_HTTP_PROTOBUF => "http/protobuf"
      2. OtlpConfigUtil.PROTOCOL_GRPC => "grpc"
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_ENDPOINT

      public static final String OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
      The Endpoint to which the metrics are exported
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_HEADERS

      public static final String OTEL_EXPORTER_OTLP_METRICS_HEADERS
      Additional headers to pass while creating OpenTelemetry exporter
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE

      public static final String OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
      Aggregation Temporality selector to export only the delta or cumulate or different
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION

      public static final String OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION
      Default histogram aggregation to be used for all histograms: Select one of the below
      1. base2_exponential_bucket_histogram
      2. explicit_bucket_histogram
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_SCALE

      public static final String OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_SCALE
      Max scale for base2_exponential_bucket_histogram
      See Also:
    • OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_BUCKETS

      public static final String OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_BUCKETS
      Max buckets for base2_exponential_bucket_histogram
      See Also:
  • Method Details

    • getServiceName

      public String getServiceName()
    • getMetricPrefix

      public String getMetricPrefix()
    • getMetricEntities

      public Collection<MetricEntity> getMetricEntities()
    • emitOtelMetrics

      public boolean emitOtelMetrics()
    • exportOtelMetricsToEndpoint

      public boolean exportOtelMetricsToEndpoint()
    • getOtelCustomDimensionsMap

      public Map<String,String> getOtelCustomDimensionsMap()
    • getOtelExportProtocol

      public String getOtelExportProtocol()
    • getOtelEndpoint

      public String getOtelEndpoint()
    • exportOtelMetricsToLog

      public boolean exportOtelMetricsToLog()
    • getOtelHeaders

      public Map<String,String> getOtelHeaders()
    • getMetricNamingFormat

      public VeniceOpenTelemetryMetricNamingFormat getMetricNamingFormat()
    • getOtelAggregationTemporalitySelector

      public io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector getOtelAggregationTemporalitySelector()
    • useOtelExponentialHistogram

      public boolean useOtelExponentialHistogram()
    • getOtelExponentialHistogramMaxScale

      public int getOtelExponentialHistogramMaxScale()
    • getOtelExponentialHistogramMaxBuckets

      public int getOtelExponentialHistogramMaxBuckets()
    • getTehutiMetricConfig

      public io.tehuti.metrics.MetricConfig getTehutiMetricConfig()
    • toString

      public String toString()
      Overrides:
      toString in class Object