Class Collector


  • public class Collector
    extends java.lang.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.

    • Method Detail

      • newBuilder

        public static Collector.Builder newBuilder​(java.lang.Class<?> loggingClass)
        Needed to scope this to the correct logging category
      • accept

        public void accept​(java.util.List<Span> spans,
                           Callback<java.lang.Void> callback)
      • accept

        public void accept​(java.util.List<Span> spans,
                           Callback<java.lang.Void> callback,
                           java.util.concurrent.Executor executor)
        Parameters:
        executor - the executor used to enqueue the storage request.

        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.