Package zipkin2.collector
Class Collector
- java.lang.Object
-
- zipkin2.collector.Collector
-
public class Collector extends Object
This component takes action on spans received from a transport. This includes deserializing, sampling and scheduling for storage.Callbacks passed do not propagate to the storage layer. They only return success or failures before storage is attempted. This ensures that calling threads are disconnected from storage threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Collector.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(List<Span> spans, Callback<Void> callback)
void
accept(List<Span> spans, Callback<Void> callback, Executor executor)
Calls to get the storage component could be blocking.void
acceptSpans(byte[] serialized, Callback<Void> callback)
Before calling this, callCollectorMetrics.incrementMessages()
, andCollectorMetrics.incrementBytes(int)
.void
acceptSpans(byte[] serializedSpans, BytesDecoder<Span> decoder, Callback<Void> callback)
Before calling this, callCollectorMetrics.incrementMessages()
, andCollectorMetrics.incrementBytes(int)
.void
acceptSpans(ByteBuffer encoded, SpanBytesDecoder decoder, Callback<Void> callback, Executor executor)
LikeacceptSpans(byte[], BytesDecoder, Callback)
, except using a byte buffer.static Collector.Builder
newBuilder(Class<?> loggingClass)
Needed to scope this to the correct logging category
-
-
-
Method Detail
-
newBuilder
public static Collector.Builder newBuilder(Class<?> loggingClass)
Needed to scope this to the correct logging category
-
accept
public void accept(List<Span> spans, Callback<Void> callback, Executor executor)
Calls to get the storage component could be blocking. This ensures requests that block callers (such as http or gRPC) do not add additional load during such events.- Parameters:
executor
- the executor used to enqueue the storage request.
-
acceptSpans
public void acceptSpans(ByteBuffer encoded, SpanBytesDecoder decoder, Callback<Void> callback, Executor executor)
LikeacceptSpans(byte[], BytesDecoder, Callback)
, except using a byte buffer.
-
acceptSpans
public void acceptSpans(byte[] serialized, Callback<Void> callback)
Before calling this, callCollectorMetrics.incrementMessages()
, andCollectorMetrics.incrementBytes(int)
. Do not call any other metrics callbacks as those are handled internal to this method.- Parameters:
serialized
- not empty message
-
acceptSpans
public void acceptSpans(byte[] serializedSpans, BytesDecoder<Span> decoder, Callback<Void> callback)
Before calling this, callCollectorMetrics.incrementMessages()
, andCollectorMetrics.incrementBytes(int)
. Do not call any other metrics callbacks as those are handled internal to this method.- Parameters:
serializedSpans
- not empty message
-
-