Class ResourceMetricsMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
io.opentelemetry.exporter.internal.otlp.metrics.ResourceMetricsMarshaler
A Marshaler of ResourceMetrics.
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 TypeFieldDescriptionprivate final InstrumentationScopeMetricsMarshaler[]
private final ResourceMarshaler
private final byte[]
-
Constructor Summary
ConstructorsConstructorDescriptionResourceMetricsMarshaler
(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeMetricsMarshaler[] instrumentationScopeMetricsMarshalers) -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calculateSize
(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeMetricsMarshaler[] instrumentationScopeMetricsMarshalers) static ResourceMetricsMarshaler[]
create
(Collection<MetricData> metricDataList) Returns Marshalers of ResourceMetrics created by grouping the provided metricData.groupByResourceAndScope
(Collection<MetricData> metricDataList) 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 Details
-
resourceMarshaler
-
schemaUrl
private final byte[] schemaUrl -
instrumentationScopeMetricsMarshalers
-
-
Constructor Details
-
ResourceMetricsMarshaler
ResourceMetricsMarshaler(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeMetricsMarshaler[] instrumentationScopeMetricsMarshalers)
-
-
Method Details
-
create
Returns Marshalers of ResourceMetrics created by grouping the provided metricData. -
writeTo
- Specified by:
writeTo
in classMarshaler
- Throws:
IOException
-
calculateSize
private static int calculateSize(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeMetricsMarshaler[] instrumentationScopeMetricsMarshalers) -
groupByResourceAndScope
private static Map<Resource,Map<InstrumentationScopeInfo, groupByResourceAndScopeList<Marshaler>>> (Collection<MetricData> metricDataList)
-