Class ResourceLogsMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
io.opentelemetry.exporter.internal.otlp.logs.ResourceLogsMarshaler
A Marshaler of ResourceLogs.
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 InstrumentationScopeLogsMarshaler[]
private final ResourceMarshaler
private final byte[]
-
Constructor Summary
ConstructorsConstructorDescriptionResourceLogsMarshaler
(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers) -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calculateSize
(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers) static ResourceLogsMarshaler[]
create
(Collection<LogRecordData> logs) Returns Marshalers of ResourceLogs created by grouping the provided logRecords.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 -
instrumentationScopeLogsMarshalers
-
-
Constructor Details
-
ResourceLogsMarshaler
ResourceLogsMarshaler(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers)
-
-
Method Details
-
create
Returns Marshalers of ResourceLogs created by grouping the provided logRecords. -
writeTo
- Specified by:
writeTo
in classMarshaler
- Throws:
IOException
-
calculateSize
private static int calculateSize(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers) -
groupByResourceAndScope
private static Map<Resource,Map<InstrumentationScopeInfo, groupByResourceAndScopeList<Marshaler>>> (Collection<LogRecordData> logs)
-