Class ResourceMetricsStatelessMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.otlp.metrics.ResourceMetricsStatelessMarshaler
- All Implemented Interfaces:
StatelessMarshaler2<Resource, Map<InstrumentationScopeInfo, List<MetricData>>>
public final class ResourceMetricsStatelessMarshaler
extends Object
implements StatelessMarshaler2<Resource, Map<InstrumentationScopeInfo, List<MetricData>>>
A Marshaler of ResourceMetrics. See
ResourceMetricsMarshaler.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ResourceMetricsStatelessMarshalerprivate static final MarshalerContext.Keyprivate static final MarshalerContext.Key -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetBinarySerializedSize(Resource resource, Map<InstrumentationScopeInfo, List<MetricData>> scopeMap, MarshalerContext context) Returns the number of bytes this Marshaler will write.voidwriteTo(Serializer output, Resource resource, Map<InstrumentationScopeInfo, List<MetricData>> scopeMap, MarshalerContext context) Marshal given key and value using the providedSerializer.
-
Field Details
-
INSTANCE
-
SCOPE_METRIC_WRITER_KEY
-
SCOPE_METRIC_SIZE_CALCULATOR_KEY
-
-
Constructor Details
-
ResourceMetricsStatelessMarshaler
private ResourceMetricsStatelessMarshaler()
-
-
Method Details
-
writeTo
public void writeTo(Serializer output, Resource resource, Map<InstrumentationScopeInfo, List<MetricData>> scopeMap, MarshalerContext context) throws IOException Description copied from interface:StatelessMarshaler2Marshal given key and value using the providedSerializer.- Specified by:
writeToin interfaceStatelessMarshaler2<Resource, Map<InstrumentationScopeInfo, List<MetricData>>>- Throws:
IOException
-
getBinarySerializedSize
public int getBinarySerializedSize(Resource resource, Map<InstrumentationScopeInfo, List<MetricData>> scopeMap, MarshalerContext context) Description copied from interface:StatelessMarshaler2Returns the number of bytes this Marshaler will write.- Specified by:
getBinarySerializedSizein interfaceStatelessMarshaler2<Resource, Map<InstrumentationScopeInfo, List<MetricData>>>
-