Class ResourceLogsStatelessMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.otlp.logs.ResourceLogsStatelessMarshaler
-
- All Implemented Interfaces:
StatelessMarshaler2<Resource,java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>>>
public final class ResourceLogsStatelessMarshaler extends java.lang.Object implements StatelessMarshaler2<Resource,java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>>>
A Marshaler of ResourceLogs. SeeResourceLogsMarshaler
.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 (package private) static ResourceLogsStatelessMarshaler
INSTANCE
private static MarshalerContext.Key
SCOPE_LOG_SIZE_CALCULATOR_KEY
private static MarshalerContext.Key
SCOPE_LOG_WRITER_KEY
-
Constructor Summary
Constructors Constructor Description ResourceLogsStatelessMarshaler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBinarySerializedSize(Resource resource, java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>> scopeMap, MarshalerContext context)
Returns the number of bytes this Marshaler will write.void
writeTo(Serializer output, Resource resource, java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>> scopeMap, MarshalerContext context)
Marshal given key and value using the providedSerializer
.
-
-
-
Field Detail
-
INSTANCE
static final ResourceLogsStatelessMarshaler INSTANCE
-
SCOPE_LOG_WRITER_KEY
private static final MarshalerContext.Key SCOPE_LOG_WRITER_KEY
-
SCOPE_LOG_SIZE_CALCULATOR_KEY
private static final MarshalerContext.Key SCOPE_LOG_SIZE_CALCULATOR_KEY
-
-
Method Detail
-
writeTo
public void writeTo(Serializer output, Resource resource, java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>> scopeMap, MarshalerContext context) throws java.io.IOException
Description copied from interface:StatelessMarshaler2
Marshal given key and value using the providedSerializer
.- Specified by:
writeTo
in interfaceStatelessMarshaler2<Resource,java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>>>
- Throws:
java.io.IOException
-
getBinarySerializedSize
public int getBinarySerializedSize(Resource resource, java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>> scopeMap, MarshalerContext context)
Description copied from interface:StatelessMarshaler2
Returns the number of bytes this Marshaler will write.- Specified by:
getBinarySerializedSize
in interfaceStatelessMarshaler2<Resource,java.util.Map<InstrumentationScopeInfo,java.util.List<LogRecordData>>>
-
-