Class MetricEntityState
- java.lang.Object
-
- com.linkedin.venice.stats.metrics.MetricEntityState
-
public class MetricEntityState extends java.lang.Object
Operational state of a metric. It holds
1.MetricEntity
2. 1 Otel Instrument and 3. multiple tehuti Sensors for this Otel Metric
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MetricEntityState.TehutiSensorRegistrationFunction
create the metrics/Sensors
-
Constructor Summary
Constructors Constructor Description MetricEntityState(MetricEntity metricEntity, VeniceOpenTelemetryMetricsRepository otelRepository)
MetricEntityState(MetricEntity metricEntity, VeniceOpenTelemetryMetricsRepository otelRepository, MetricEntityState.TehutiSensorRegistrationFunction registerTehutiSensor, java.util.Map<TehutiMetricNameEnum,java.util.List<io.tehuti.metrics.MeasurableStat>> tehutiMetricInput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTehutiSensors(TehutiMetricNameEnum name, io.tehuti.metrics.Sensor tehutiSensor)
Add TehutiSensor
to tehutiSensors map and throw exception if sensor with same name already existsvoid
createMetric(VeniceOpenTelemetryMetricsRepository otelRepository, java.util.Map<TehutiMetricNameEnum,java.util.List<io.tehuti.metrics.MeasurableStat>> tehutiMetricInput, MetricEntityState.TehutiSensorRegistrationFunction registerTehutiSensor)
void
record(TehutiMetricNameEnum tehutiMetricNameEnum, double value, io.opentelemetry.api.common.Attributes otelDimensions)
void
record(TehutiMetricNameEnum tehutiMetricNameEnum, long value, io.opentelemetry.api.common.Attributes otelDimensions)
void
setOtelMetric(java.lang.Object otelMetric)
-
-
-
Constructor Detail
-
MetricEntityState
public MetricEntityState(MetricEntity metricEntity, VeniceOpenTelemetryMetricsRepository otelRepository)
-
MetricEntityState
public MetricEntityState(MetricEntity metricEntity, VeniceOpenTelemetryMetricsRepository otelRepository, MetricEntityState.TehutiSensorRegistrationFunction registerTehutiSensor, java.util.Map<TehutiMetricNameEnum,java.util.List<io.tehuti.metrics.MeasurableStat>> tehutiMetricInput)
-
-
Method Detail
-
setOtelMetric
public void setOtelMetric(java.lang.Object otelMetric)
-
addTehutiSensors
public void addTehutiSensors(TehutiMetricNameEnum name, io.tehuti.metrics.Sensor tehutiSensor)
Add TehutiSensor
to tehutiSensors map and throw exception if sensor with same name already exists
-
createMetric
public void createMetric(VeniceOpenTelemetryMetricsRepository otelRepository, java.util.Map<TehutiMetricNameEnum,java.util.List<io.tehuti.metrics.MeasurableStat>> tehutiMetricInput, MetricEntityState.TehutiSensorRegistrationFunction registerTehutiSensor)
-
record
public void record(TehutiMetricNameEnum tehutiMetricNameEnum, long value, io.opentelemetry.api.common.Attributes otelDimensions)
-
record
public void record(TehutiMetricNameEnum tehutiMetricNameEnum, double value, io.opentelemetry.api.common.Attributes otelDimensions)
-
-