public class Trace extends Object
| 构造器和说明 |
|---|
Trace(Long traceId,
String traceKey,
Long spanId,
Long parentSpanId)
Instantiates a new trace context.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Trace |
copy()
Copy.
|
Trace |
getParent()
Gets the parent.
|
Long |
getParentSpanId()
Gets the parent span id.
|
Long |
getSpanId()
Gets the span id.
|
Long |
getTraceId()
Gets the trace id.
|
String |
getTraceKey()
Gets the trace key.
|
static Trace |
newParentTrace()
New parent trace with current time(MS) as the value for trace id .
|
void |
setParentSpanId(Long parentSpanId)
Sets the parent span id.
|
void |
setSpanId(Long spanId)
Sets the span id.
|
void |
setTraceId(Long traceId)
Sets the trace id.
|
void |
setTraceKey(String traceKey)
Sets the trace key.
|
void |
stepInto()
Step into.
|
void |
stepOver()
Step over.
|
void |
stepReturn()
Step return.
|
String |
toString()
To string.
|
public static Trace newParentTrace()
public void stepInto()
public void stepOver()
public void stepReturn()
trace - the tracepublic Trace copy()
public Long getTraceId()
public void setTraceId(Long traceId)
traceId - the new trace idpublic Long getSpanId()
public void setSpanId(Long spanId)
spanId - the new span idpublic Long getParentSpanId()
public void setParentSpanId(Long parentSpanId)
parentSpanId - the new parent span idpublic String getTraceKey()
public void setTraceKey(String traceKey)
traceKey - the new trace keypublic Trace getParent()
Copyright © 2022 Baidu, Inc.. All rights reserved.