Class ResourceSpansStatelessMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.otlp.traces.ResourceSpansStatelessMarshaler
- All Implemented Interfaces:
StatelessMarshaler2<Resource,
Map<InstrumentationScopeInfo, List<SpanData>>>
public final class ResourceSpansStatelessMarshaler
extends Object
implements StatelessMarshaler2<Resource,Map<InstrumentationScopeInfo,List<SpanData>>>
A Marshaler of ResourceSpans. See
ResourceSpansMarshaler
.
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 ResourceSpansStatelessMarshaler
private static final MarshalerContext.Key
private static final MarshalerContext.Key
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getBinarySerializedSize
(Resource resource, Map<InstrumentationScopeInfo, List<SpanData>> scopeMap, MarshalerContext context) Returns the number of bytes this Marshaler will write.void
writeTo
(Serializer output, Resource resource, Map<InstrumentationScopeInfo, List<SpanData>> scopeMap, MarshalerContext context) Marshal given key and value using the providedSerializer
.
-
Field Details
-
INSTANCE
-
SCOPE_SPAN_WRITER_KEY
-
SCOPE_SPAN_SIZE_CALCULATOR_KEY
-
-
Constructor Details
-
ResourceSpansStatelessMarshaler
private ResourceSpansStatelessMarshaler()
-
-
Method Details
-
writeTo
public void writeTo(Serializer output, Resource resource, Map<InstrumentationScopeInfo, List<SpanData>> scopeMap, MarshalerContext context) throws IOExceptionDescription copied from interface:StatelessMarshaler2
Marshal given key and value using the providedSerializer
.- Specified by:
writeTo
in interfaceStatelessMarshaler2<Resource,
Map<InstrumentationScopeInfo, List<SpanData>>> - Throws:
IOException
-
getBinarySerializedSize
public int getBinarySerializedSize(Resource resource, Map<InstrumentationScopeInfo, List<SpanData>> scopeMap, MarshalerContext context) Description copied from interface:StatelessMarshaler2
Returns the number of bytes this Marshaler will write.- Specified by:
getBinarySerializedSize
in interfaceStatelessMarshaler2<Resource,
Map<InstrumentationScopeInfo, List<SpanData>>>
-