|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.ipc.RPCPlugin org.apache.avro.ipc.trace.TracePlugin
public class TracePlugin
A tracing plugin for Avro. This plugin traces RPC call timing and follows nested trees of RPC calls. To use, instantiate and add to an existing Requestor or Responder. If you have a Responder that itself acts as an RPC client (i.e. it contains a Requestor) be sure to pass the same instance of the plugin to both components so that propagation occurs correctly. Currently, propagation only works if each requester is performing serial RPC calls. That is, we cannot support the case in which the Requestor's request does not occur in the same thread as the Responder's response.
Nested Class Summary | |
---|---|
static class |
TracePlugin.StorageType
|
Field Summary | |
---|---|
protected org.mortbay.jetty.Server |
clientFacingServer
|
protected HttpServer |
httpServer
|
protected SpecificResponder |
responder
|
protected SpanStorage |
storage
|
Constructor Summary | |
---|---|
TracePlugin(TracePluginConfiguration conf)
|
Method Summary | |
---|---|
void |
clientFinishConnect(RPCContext context)
Called on the client after the initial RPC handshake |
void |
clientReceiveResponse(RPCContext context)
This method is invoked at the client after the call is executed, and after the client receives the response |
void |
clientSendRequest(RPCContext context)
This method is invoked at the client before it issues the RPC call. |
void |
clientStartConnect(RPCContext context)
Called on the client before the initial RPC handshake to setup any handshake metadata for this plugin |
protected void |
initializeClientServer()
Start a client-facing server. |
void |
serverConnecting(RPCContext context)
Called on the server during the RPC handshake |
void |
serverReceiveRequest(RPCContext context)
This method is invoked at the RPC server when the request is received, but before the call itself is executed |
void |
serverSendResponse(RPCContext context)
This method is invoked at the server before the response is executed, but before the response has been formulated |
void |
stopClientServer()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SpanStorage storage
protected HttpServer httpServer
protected SpecificResponder responder
protected org.mortbay.jetty.Server clientFacingServer
Constructor Detail |
---|
public TracePlugin(TracePluginConfiguration conf) throws IOException
IOException
Method Detail |
---|
public void clientStartConnect(RPCContext context)
RPCPlugin
clientStartConnect
in class RPCPlugin
context
- the handshake rpc contextpublic void serverConnecting(RPCContext context)
RPCPlugin
serverConnecting
in class RPCPlugin
context
- the handshake rpc contextpublic void clientFinishConnect(RPCContext context)
RPCPlugin
clientFinishConnect
in class RPCPlugin
context
- the handshake rpc contextpublic void clientSendRequest(RPCContext context)
RPCPlugin
clientSendRequest
in class RPCPlugin
context
- the per-call rpc context (in/out parameter)public void serverReceiveRequest(RPCContext context)
RPCPlugin
serverReceiveRequest
in class RPCPlugin
context
- the per-call rpc context (in/out parameter)public void serverSendResponse(RPCContext context)
RPCPlugin
serverSendResponse
in class RPCPlugin
context
- the per-call rpc context (in/out parameter)public void clientReceiveResponse(RPCContext context)
RPCPlugin
clientReceiveResponse
in class RPCPlugin
context
- the per-call rpc contextpublic void stopClientServer()
protected void initializeClientServer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |