use of org.apache.skywalking.apm.agent.core.context.ids.PropagatedTraceId in project incubator-skywalking by apache.
the class ContextCarrier method deserialize.
/**
* Initialize fields with the given text.
*
* @param text carries {@link #traceSegmentId} and {@link #spanId}, with '|' split.
*/
ContextCarrier deserialize(String text) {
if (text != null) {
String[] parts = text.split("\\|", 8);
if (parts.length == 8) {
try {
this.traceSegmentId = new ID(parts[0]);
this.spanId = Integer.parseInt(parts[1]);
this.parentApplicationInstanceId = Integer.parseInt(parts[2]);
this.entryApplicationInstanceId = Integer.parseInt(parts[3]);
this.peerHost = parts[4];
this.entryOperationName = parts[5];
this.parentOperationName = parts[6];
this.primaryDistributedTraceId = new PropagatedTraceId(parts[7]);
} catch (NumberFormatException e) {
}
}
}
return this;
}
Aggregations