Class MetricsRequestMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.Marshaler
-
- io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
-
- io.opentelemetry.exporter.internal.otlp.metrics.MetricsRequestMarshaler
-
public final class MetricsRequestMarshaler extends MarshalerWithSize
Marshaler
to convert SDKMetricData
to OTLP ExportMetricsServiceRequest.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceMetricsMarshaler[]
resourceMetricsMarshalers
-
Constructor Summary
Constructors Modifier Constructor Description private
MetricsRequestMarshaler(ResourceMetricsMarshaler[] resourceMetricsMarshalers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
calculateSize(ResourceMetricsMarshaler[] resourceMetricsMarshalers)
static MetricsRequestMarshaler
create(java.util.Collection<MetricData> metricDataList)
Returns aMetricsRequestMarshaler
that can be used to convert the providedMetricData
into a serialized OTLP ExportMetricsServiceRequest.void
writeTo(Serializer output)
-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
getBinarySerializedSize
-
Methods inherited from class io.opentelemetry.exporter.internal.marshal.Marshaler
writeBinaryTo, writeJsonTo, writeJsonTo, writeJsonWithNewline
-
-
-
-
Field Detail
-
resourceMetricsMarshalers
private final ResourceMetricsMarshaler[] resourceMetricsMarshalers
-
-
Constructor Detail
-
MetricsRequestMarshaler
private MetricsRequestMarshaler(ResourceMetricsMarshaler[] resourceMetricsMarshalers)
-
-
Method Detail
-
create
public static MetricsRequestMarshaler create(java.util.Collection<MetricData> metricDataList)
Returns aMetricsRequestMarshaler
that can be used to convert the providedMetricData
into a serialized OTLP ExportMetricsServiceRequest.
-
writeTo
public void writeTo(Serializer output) throws java.io.IOException
-
calculateSize
private static int calculateSize(ResourceMetricsMarshaler[] resourceMetricsMarshalers)
-
-