Package com.linkedin.venice.stats
Class VeniceMetricsConfig
- java.lang.Object
-
- com.linkedin.venice.stats.VeniceMetricsConfig
-
public class VeniceMetricsConfig extends java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VeniceMetricsConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION
Default histogram aggregation to be used for all histograms: Select one of the below
1.static java.lang.String
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_BUCKETS
Max buckets for base2_exponential_bucket_histogramstatic java.lang.String
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_SCALE
Max scale for base2_exponential_bucket_histogramstatic java.lang.String
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
The Endpoint to which the metrics are exportedstatic java.lang.String
OTEL_EXPORTER_OTLP_METRICS_HEADERS
Additional headers to pass while creating OpenTelemetry exporterstatic java.lang.String
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
Protocol over which the metrics are exported toOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
1.static java.lang.String
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
Aggregation Temporality selector to export only the delta or cumulate or differentstatic java.lang.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.static java.lang.String
OTEL_VENICE_METRICS_ENABLED
Config to enable OpenTelemetry metricsstatic java.lang.String
OTEL_VENICE_METRICS_EXPORT_TO_ENDPOINT
Export opentelemetry metrics toOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
overOTEL_EXPORTER_OTLP_METRICS_PROTOCOL
static java.lang.String
OTEL_VENICE_METRICS_EXPORT_TO_LOG
Export opentelemetry metrics to a log exporterVeniceOpenTelemetryMetricsRepository.LogBasedMetricExporter
static java.lang.String
OTEL_VENICE_METRICS_NAMING_FORMAT
Config to set the naming format for OpenTelemetry metricsVeniceOpenTelemetryMetricNamingFormat
static java.lang.String
OTEL_VENICE_METRICS_PREFIX
Config to set the metric prefix for OpenTelemetry metrics
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
emitOtelMetrics()
boolean
exportOtelMetricsToEndpoint()
boolean
exportOtelMetricsToLog()
java.util.Collection<MetricEntity>
getMetricEntities()
VeniceOpenTelemetryMetricNamingFormat
getMetricNamingFormat()
java.lang.String
getMetricPrefix()
io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector
getOtelAggregationTemporalitySelector()
java.util.Map<java.lang.String,java.lang.String>
getOtelCustomDimensionsMap()
java.lang.String
getOtelEndpoint()
int
getOtelExponentialHistogramMaxBuckets()
int
getOtelExponentialHistogramMaxScale()
java.lang.String
getOtelExportProtocol()
java.util.Map<java.lang.String,java.lang.String>
getOtelHeaders()
java.lang.String
getServiceName()
io.tehuti.metrics.MetricConfig
getTehutiMetricConfig()
java.lang.String
toString()
boolean
useOtelExponentialHistogram()
-
-
-
Field Detail
-
OTEL_VENICE_METRICS_ENABLED
public static final java.lang.String OTEL_VENICE_METRICS_ENABLED
Config to enable OpenTelemetry metrics- See Also:
- Constant Field Values
-
OTEL_VENICE_METRICS_PREFIX
public static final java.lang.String OTEL_VENICE_METRICS_PREFIX
Config to set the metric prefix for OpenTelemetry metrics- See Also:
- Constant Field Values
-
OTEL_VENICE_METRICS_NAMING_FORMAT
public static final java.lang.String OTEL_VENICE_METRICS_NAMING_FORMAT
Config to set the naming format for OpenTelemetry metricsVeniceOpenTelemetryMetricNamingFormat
- See Also:
- Constant Field Values
-
OTEL_VENICE_METRICS_EXPORT_TO_LOG
public static final java.lang.String OTEL_VENICE_METRICS_EXPORT_TO_LOG
Export opentelemetry metrics to a log exporterVeniceOpenTelemetryMetricsRepository.LogBasedMetricExporter
- See Also:
- Constant Field Values
-
OTEL_VENICE_METRICS_EXPORT_TO_ENDPOINT
public static final java.lang.String OTEL_VENICE_METRICS_EXPORT_TO_ENDPOINT
Export opentelemetry metrics toOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
overOTEL_EXPORTER_OTLP_METRICS_PROTOCOL
- See Also:
- Constant Field Values
-
OTEL_VENICE_METRICS_CUSTOM_DIMENSIONS_MAP
public static final java.lang.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:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
Protocol over which the metrics are exported toOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
1.OtlpConfigUtil.PROTOCOL_HTTP_PROTOBUF
=> "http/protobuf"
2.OtlpConfigUtil.PROTOCOL_GRPC
=> "grpc"- See Also:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
The Endpoint to which the metrics are exported- See Also:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_HEADERS
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_HEADERS
Additional headers to pass while creating OpenTelemetry exporter- See Also:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
Aggregation Temporality selector to export only the delta or cumulate or different- See Also:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION
public static final java.lang.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:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_SCALE
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_SCALE
Max scale for base2_exponential_bucket_histogram- See Also:
- Constant Field Values
-
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_BUCKETS
public static final java.lang.String OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION_MAX_BUCKETS
Max buckets for base2_exponential_bucket_histogram- See Also:
- Constant Field Values
-
-
Method Detail
-
getServiceName
public java.lang.String getServiceName()
-
getMetricPrefix
public java.lang.String getMetricPrefix()
-
getMetricEntities
public java.util.Collection<MetricEntity> getMetricEntities()
-
emitOtelMetrics
public boolean emitOtelMetrics()
-
exportOtelMetricsToEndpoint
public boolean exportOtelMetricsToEndpoint()
-
getOtelCustomDimensionsMap
public java.util.Map<java.lang.String,java.lang.String> getOtelCustomDimensionsMap()
-
getOtelExportProtocol
public java.lang.String getOtelExportProtocol()
-
getOtelEndpoint
public java.lang.String getOtelEndpoint()
-
exportOtelMetricsToLog
public boolean exportOtelMetricsToLog()
-
getOtelHeaders
public java.util.Map<java.lang.String,java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-