Class ResourceSpansMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
io.opentelemetry.exporter.internal.otlp.traces.ResourceSpansMarshaler
A Marshaler of ResourceSpans.
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 InstrumentationScopeSpansMarshaler[]
private final ResourceMarshaler
private final byte[]
-
Constructor Summary
ConstructorsConstructorDescriptionResourceSpansMarshaler
(ResourceMarshaler resourceMarshaler, byte[] schemaUrlUtf8, InstrumentationScopeSpansMarshaler[] instrumentationScopeSpansMarshalers) -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calculateSize
(ResourceMarshaler resourceMarshaler, byte[] schemaUrlUtf8, InstrumentationScopeSpansMarshaler[] instrumentationScopeSpansMarshalers) static ResourceSpansMarshaler[]
create
(Collection<SpanData> spanDataList) Returns Marshalers of ResourceSpans created by grouping the provided SpanData.private static Map
<Resource, Map<InstrumentationScopeInfo, List<SpanMarshaler>>> groupByResourceAndScope
(Collection<SpanData> spanDataList) 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
-
schemaUrlUtf8
private final byte[] schemaUrlUtf8 -
instrumentationScopeSpansMarshalers
-
-
Constructor Details
-
ResourceSpansMarshaler
ResourceSpansMarshaler(ResourceMarshaler resourceMarshaler, byte[] schemaUrlUtf8, InstrumentationScopeSpansMarshaler[] instrumentationScopeSpansMarshalers)
-
-
Method Details
-
create
Returns Marshalers of ResourceSpans created by grouping the provided SpanData. -
writeTo
- Specified by:
writeTo
in classMarshaler
- Throws:
IOException
-
calculateSize
private static int calculateSize(ResourceMarshaler resourceMarshaler, byte[] schemaUrlUtf8, InstrumentationScopeSpansMarshaler[] instrumentationScopeSpansMarshalers) -
groupByResourceAndScope
private static Map<Resource,Map<InstrumentationScopeInfo, groupByResourceAndScopeList<SpanMarshaler>>> (Collection<SpanData> spanDataList)
-