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 ResourceMarshalerprivate final byte[] -
Constructor Summary
ConstructorsConstructorDescriptionResourceLogsMarshaler(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers) -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalculateSize(ResourceMarshaler resourceMarshaler, byte[] schemaUrl, InstrumentationScopeLogsMarshaler[] instrumentationScopeLogsMarshalers) static ResourceLogsMarshaler[]create(Collection<LogRecordData> logs) Returns Marshalers of ResourceLogs created by grouping the provided logRecords.voidwriteTo(Serializer output) Methods inherited from class io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
getBinarySerializedSizeMethods 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:
writeToin 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)
-