Package codes.grow.packages.skywalking
Record Class Sw8Context
java.lang.Object
java.lang.Record
codes.grow.packages.skywalking.Sw8Context
- Record Components:
sample- whether the upstream sampled the tracetraceId- native trace id (opaque string, e.g.<hex>.<n>.<ms>)parentTraceSegmentId- segment id of the parent (calling) segmentparentSpanId- span id of the exit span in the parent segmentparentService- service of the callerparentServiceInstance- instance of the callerparentEndpoint- endpoint (operation) of the caller's entry spannetworkAddressUsedAtPeer- address the caller used to reach this service (host:port)
public record Sw8Context(boolean sample, String traceId, String parentTraceSegmentId, int parentSpanId, String parentService, String parentServiceInstance, String parentEndpoint, String networkAddressUsedAtPeer)
extends Record
A decoded
sw8 header (SkyWalking cross-process propagation v3): the parent of a native
SkyWalking span.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()Encodes the header value (seeSw8.encode(codes.grow.packages.skywalking.Sw8Context)).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenetworkAddressUsedAtPeerrecord component.Returns the value of theparentEndpointrecord component.Returns the value of theparentServicerecord component.Returns the value of theparentServiceInstancerecord component.intReturns the value of theparentSpanIdrecord component.Returns the value of theparentTraceSegmentIdrecord component.booleansample()Returns the value of thesamplerecord component.final StringtoString()Returns a string representation of this record class.traceId()Returns the value of thetraceIdrecord component.
-
Constructor Details
-
Sw8Context
public Sw8Context(boolean sample, String traceId, String parentTraceSegmentId, int parentSpanId, String parentService, String parentServiceInstance, String parentEndpoint, String networkAddressUsedAtPeer) Normalises nulls to empty strings.- Parameters:
sample- sample flagtraceId- trace idparentTraceSegmentId- segment idparentSpanId- span idparentService- serviceparentServiceInstance- instanceparentEndpoint- endpointnetworkAddressUsedAtPeer- peer address
-
-
Method Details
-
encode
Encodes the header value (seeSw8.encode(codes.grow.packages.skywalking.Sw8Context)).- Returns:
- the
sw8value
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sample
public boolean sample()Returns the value of thesamplerecord component.- Returns:
- the value of the
samplerecord component
-
traceId
Returns the value of thetraceIdrecord component.- Returns:
- the value of the
traceIdrecord component
-
parentTraceSegmentId
Returns the value of theparentTraceSegmentIdrecord component.- Returns:
- the value of the
parentTraceSegmentIdrecord component
-
parentSpanId
public int parentSpanId()Returns the value of theparentSpanIdrecord component.- Returns:
- the value of the
parentSpanIdrecord component
-
parentService
Returns the value of theparentServicerecord component.- Returns:
- the value of the
parentServicerecord component
-
parentServiceInstance
Returns the value of theparentServiceInstancerecord component.- Returns:
- the value of the
parentServiceInstancerecord component
-
parentEndpoint
Returns the value of theparentEndpointrecord component.- Returns:
- the value of the
parentEndpointrecord component
-
networkAddressUsedAtPeer
Returns the value of thenetworkAddressUsedAtPeerrecord component.- Returns:
- the value of the
networkAddressUsedAtPeerrecord component
-