Class LogMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.Marshaler
-
- io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
-
- io.opentelemetry.exporter.internal.otlp.logs.LogMarshaler
-
final class LogMarshaler extends MarshalerWithSize
-
-
Field Summary
Fields Modifier and Type Field Description private MarshalerWithSizeanyValueMarshalerprivate KeyValueMarshaler[]attributeMarshalersprivate intdroppedAttributesCountprivate static java.lang.StringINVALID_SPAN_IDprivate static java.lang.StringINVALID_TRACE_IDprivate longobservedTimeUnixNanoprivate ProtoEnumInfoseverityNumberprivate byte[]severityTextprivate java.lang.StringspanIdprivate longtimeUnixNanoprivate TraceFlagstraceFlagsprivate java.lang.StringtraceId
-
Constructor Summary
Constructors Modifier Constructor Description privateLogMarshaler(long timeUnixNano, long observedTimeUnixNano, ProtoEnumInfo severityNumber, byte[] severityText, MarshalerWithSize anyValueMarshaler, KeyValueMarshaler[] attributeMarshalers, int droppedAttributesCount, TraceFlags traceFlags, java.lang.String traceId, java.lang.String spanId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intcalculateSize(long timeUnixNano, long observedTimeUnixNano, ProtoEnumInfo severityNumber, byte[] severityText, MarshalerWithSize anyValueMarshaler, KeyValueMarshaler[] attributeMarshalers, int droppedAttributesCount, TraceFlags traceFlags, java.lang.String traceId, java.lang.String spanId)(package private) static LogMarshalercreate(LogRecordData logRecordData)(package private) static ProtoEnumInfotoProtoSeverityNumber(Severity severity)protected voidwriteTo(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 Detail
-
INVALID_TRACE_ID
private static final java.lang.String INVALID_TRACE_ID
-
INVALID_SPAN_ID
private static final java.lang.String INVALID_SPAN_ID
-
timeUnixNano
private final long timeUnixNano
-
observedTimeUnixNano
private final long observedTimeUnixNano
-
severityNumber
private final ProtoEnumInfo severityNumber
-
severityText
private final byte[] severityText
-
anyValueMarshaler
@Nullable private final MarshalerWithSize anyValueMarshaler
-
attributeMarshalers
private final KeyValueMarshaler[] attributeMarshalers
-
droppedAttributesCount
private final int droppedAttributesCount
-
traceFlags
private final TraceFlags traceFlags
-
traceId
@Nullable private final java.lang.String traceId
-
spanId
@Nullable private final java.lang.String spanId
-
-
Constructor Detail
-
LogMarshaler
private LogMarshaler(long timeUnixNano, long observedTimeUnixNano, ProtoEnumInfo severityNumber, byte[] severityText, @Nullable MarshalerWithSize anyValueMarshaler, KeyValueMarshaler[] attributeMarshalers, int droppedAttributesCount, TraceFlags traceFlags, @Nullable java.lang.String traceId, @Nullable java.lang.String spanId)
-
-
Method Detail
-
create
static LogMarshaler create(LogRecordData logRecordData)
-
writeTo
protected void writeTo(Serializer output) throws java.io.IOException
-
calculateSize
private static int calculateSize(long timeUnixNano, long observedTimeUnixNano, ProtoEnumInfo severityNumber, byte[] severityText, @Nullable MarshalerWithSize anyValueMarshaler, KeyValueMarshaler[] attributeMarshalers, int droppedAttributesCount, TraceFlags traceFlags, @Nullable java.lang.String traceId, @Nullable java.lang.String spanId)
-
toProtoSeverityNumber
static ProtoEnumInfo toProtoSeverityNumber(Severity severity)
-
-