cloudtrace.instrument.receivers
Class AsyncSpanReceiver<SpanKey,Destination>
java.lang.Object
cloudtrace.instrument.receivers.AsyncSpanReceiver<SpanKey,Destination>
- All Implemented Interfaces:
- SpanReceiver
- Direct Known Subclasses:
- SendSpansViaThrift
public abstract class AsyncSpanReceiver<SpanKey,Destination>
- extends java.lang.Object
- implements SpanReceiver
Deliver Span information periodically to a destination.
- Send host and service information with the span.
- Cache Destination objects by some key that can be extracted from the span.
- Can be used to queue spans up for delivery over RPC, or for saving into a file.
Field Summary |
protected java.lang.String |
host
|
protected java.lang.String |
service
|
Constructor Summary |
AsyncSpanReceiver(java.lang.String host,
java.lang.String service,
long millis)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
protected final java.lang.String host
service
protected final java.lang.String service
AsyncSpanReceiver
public AsyncSpanReceiver(java.lang.String host,
java.lang.String service,
long millis)
createDestination
protected abstract Destination createDestination(SpanKey key)
throws java.lang.Exception
- Throws:
java.lang.Exception
send
protected abstract void send(Destination resource,
RemoteSpan span)
throws java.lang.Exception
- Throws:
java.lang.Exception
getSpanKey
protected abstract SpanKey getSpanKey(java.util.Map<java.lang.String,java.lang.String> data)
span
public void span(long traceId,
long spanId,
long parentId,
long start,
long stop,
java.lang.String description,
java.util.Map<java.lang.String,java.lang.String> data)
- Specified by:
span
in interface SpanReceiver
flush
public void flush()
- Specified by:
flush
in interface SpanReceiver
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.