Class OpenTelemetryMetricSink
java.lang.Object
io.grpc.opentelemetry.OpenTelemetryMetricSink
- All Implemented Interfaces:
io.grpc.MetricSink
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classNested classes/interfaces inherited from interface io.grpc.MetricSink
io.grpc.MetricSink.Registration -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final Objectprivate static final Loggerprivate List<OpenTelemetryMetricSink.MeasuresData> private final io.opentelemetry.api.metrics.Meter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDoubleCounter(io.grpc.DoubleCounterMetricInstrument metricInstrument, double value, List<String> requiredLabelValues, List<String> optionalLabelValues) voidaddLongCounter(io.grpc.LongCounterMetricInstrument metricInstrument, long value, List<String> requiredLabelValues, List<String> optionalLabelValues) private io.opentelemetry.api.common.AttributescreateAttributes(List<String> requiredLabelKeys, List<String> optionalLabelKeys, List<String> requiredLabelValues, List<String> optionalLabelValues, BitSet bitSet) (package private) List<OpenTelemetryMetricSink.MeasuresData> intvoidrecordDoubleHistogram(io.grpc.DoubleHistogramMetricInstrument metricInstrument, double value, List<String> requiredLabelValues, List<String> optionalLabelValues) voidrecordLongGauge(io.grpc.LongGaugeMetricInstrument metricInstrument, long value, List<String> requiredLabelValues, List<String> optionalLabelValues) voidrecordLongHistogram(io.grpc.LongHistogramMetricInstrument metricInstrument, long value, List<String> requiredLabelValues, List<String> optionalLabelValues) io.grpc.MetricSink.RegistrationregisterBatchCallback(Runnable callback, io.grpc.CallbackMetricInstrument... metricInstruments) private booleanshouldEnableMetric(io.grpc.MetricInstrument instrument) voidupdateMeasures(List<io.grpc.MetricInstrument> instruments)
-
Field Details
-
logger
-
lock
-
openTelemetryMeter
private final io.opentelemetry.api.metrics.Meter openTelemetryMeter -
enableMetrics
-
disableDefaultMetrics
private final boolean disableDefaultMetrics -
optionalLabels
-
measures
-
-
Constructor Details
-
OpenTelemetryMetricSink
-
-
Method Details
-
getEnabledMetrics
-
getOptionalLabels
-
getMeasuresSize
public int getMeasuresSize()- Specified by:
getMeasuresSizein interfaceio.grpc.MetricSink
-
getMeasures
List<OpenTelemetryMetricSink.MeasuresData> getMeasures() -
addDoubleCounter
-
addLongCounter
-
recordDoubleHistogram
-
recordLongHistogram
-
recordLongGauge
-
registerBatchCallback
public io.grpc.MetricSink.Registration registerBatchCallback(Runnable callback, io.grpc.CallbackMetricInstrument... metricInstruments) - Specified by:
registerBatchCallbackin interfaceio.grpc.MetricSink
-
updateMeasures
- Specified by:
updateMeasuresin interfaceio.grpc.MetricSink
-
shouldEnableMetric
private boolean shouldEnableMetric(io.grpc.MetricInstrument instrument) -
createAttributes
-