- All Implemented Interfaces:
- Closeable, AutoCloseable
public class HTracedSpanReceiver
extends SpanReceiver
The SpanReceiver which sends spans to htraced.
HTracedSpanReceiver sends trace spans out to the htraced daemon, where they
are stored and indexed. It supports two forms of RPC: a JSON/HTTP form, and
an HRPC/msgpack form. We will use the msgpack form when
htraced.receiver.packed is set to true.
HTraced buffers are several megabytes in size, and we reuse them to avoid
creating extra garbage on the heap. They are flushed whenever a timeout
elapses, or when they get more than a configurable percent full. We allocate
two buffers so that we can continue filling one buffer while the other is
being sent over the wire. The buffers store serialized spans. This is
better than storing references to span objects because it minimzes the amount
of pointers we have to follow during a GC. Buffers are managed by instances
of BufferManager.