cloudtrace.instrument.receivers
Class AsyncSpanReceiver<SpanKey,Destination>

java.lang.Object
  extended by 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.


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)
           
 
Method Summary
protected abstract  Destination createDestination(SpanKey key)
           
 void flush()
           
protected abstract  SpanKey getSpanKey(java.util.Map<java.lang.String,java.lang.String> data)
           
protected abstract  void send(Destination resource, RemoteSpan span)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected final java.lang.String host

service

protected final java.lang.String service
Constructor Detail

AsyncSpanReceiver

public AsyncSpanReceiver(java.lang.String host,
                         java.lang.String service,
                         long millis)
Method Detail

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.