Package dev.dokimos.server.dto.v1.otlp
Record Class OtlpSpan
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.otlp.OtlpSpan
public record OtlpSpan(String traceId, String spanId, String parentSpanId, String name, String kind, String startTimeUnixNano, String endTimeUnixNano, OtlpStatus status, List<OtlpKeyValue> attributes)
extends Record
One OTLP span in the JSON encoding.
traceId and spanId are hex strings;
startTimeUnixNano and endTimeUnixNano are uint64 values encoded as JSON strings, so
they are mapped as strings and parsed leniently. kind may be a numeric or symbolic enum.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of theendTimeUnixNanorecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.Returns the value of theparentSpanIdrecord component.spanId()Returns the value of thespanIdrecord component.Returns the value of thestartTimeUnixNanorecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.traceId()Returns the value of thetraceIdrecord component.
-
Constructor Details
-
OtlpSpan
public OtlpSpan(String traceId, String spanId, String parentSpanId, String name, String kind, String startTimeUnixNano, String endTimeUnixNano, OtlpStatus status, List<OtlpKeyValue> attributes) Creates an instance of aOtlpSpanrecord class.- Parameters:
traceId- the value for thetraceIdrecord componentspanId- the value for thespanIdrecord componentparentSpanId- the value for theparentSpanIdrecord componentname- the value for thenamerecord componentkind- the value for thekindrecord componentstartTimeUnixNano- the value for thestartTimeUnixNanorecord componentendTimeUnixNano- the value for theendTimeUnixNanorecord componentstatus- the value for thestatusrecord componentattributes- the value for theattributesrecord component
-
-
Method Details
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
traceId
Returns the value of thetraceIdrecord component.- Returns:
- the value of the
traceIdrecord component
-
spanId
Returns the value of thespanIdrecord component.- Returns:
- the value of the
spanIdrecord component
-
parentSpanId
Returns the value of theparentSpanIdrecord component.- Returns:
- the value of the
parentSpanIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
startTimeUnixNano
Returns the value of thestartTimeUnixNanorecord component.- Returns:
- the value of the
startTimeUnixNanorecord component
-
endTimeUnixNano
Returns the value of theendTimeUnixNanorecord component.- Returns:
- the value of the
endTimeUnixNanorecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-