public class DefaultMessageManager.Context extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Set<Throwable> |
knownExceptions |
protected int |
nexLocalThreadId |
protected Stack<Transaction> |
stack |
protected long |
totalDuration
for truncate message;
|
| Constructor and Description |
|---|
Context()
当调用者为Trace.newTransaction,complete时,考虑以下几种情况: 1.
|
Context(String requestId,
String rpcId) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Message message) |
boolean |
end(Transaction transaction) |
String |
getClientAppId() |
String |
getCurrentRequestId() |
String |
getCurrentRpcIdAndCurrentCall() |
protected Message |
getRoot() |
String |
getRpcId() |
String |
nextRemoteRpcId() |
void |
setup(String requestId,
String rpcId) |
boolean |
shouldLog(Throwable throwable) |
void |
start(Transaction transaction) |
protected Stack<Transaction> stack
protected long totalDuration
protected int nexLocalThreadId
public Context()
Trace.newTransaction()
可以方便地和鹰眼同步的api协同 2. MultiMessageProducer时 默认关闭打鹰眼指标的功能 高级用法(不推荐)可以通过调用setForceCallEagleAPI(true)
可以开启异步模式下调用鹰眼
使用方必须保证线程上下文里没有鹰眼的指标调用,否则链路层级会错乱public String nextRemoteRpcId()
public String getClientAppId()
public String getCurrentRequestId()
public String getRpcId()
public String getCurrentRpcIdAndCurrentCall()
public void add(Message message)
public boolean shouldLog(Throwable throwable)
public void start(Transaction transaction)
public boolean end(Transaction transaction)
protected Message getRoot()
Copyright © 2019. All rights reserved.