Class SpanExporterImpl

    • Method Detail

      • create

        static SpanExporterImpl create​(int bufferSize,
                                       Duration scheduleDelay)
        Constructs a SpanExporterImpl that exports the SpanData asynchronously.

        Starts a separate thread that wakes up every scheduleDelay and exports any available spans data. If the number of buffered SpanData objects is greater than bufferSize then the thread wakes up sooner.

        Parameters:
        bufferSize - the size of the buffered span data.
        scheduleDelay - the maximum delay.
      • addSpan

        public void addSpan​(RecordEventsSpanImpl span)
        Adds a Span to the exporting service.
        Parameters:
        span - the Span to be added.
      • registerHandler

        public void registerHandler​(java.lang.String name,
                                    SpanExporter.Handler handler)
        Description copied from class: SpanExporter
        Registers a new service handler that is used by the library to export SpanData for sampled spans (see TraceOptions.isSampled()).
        Specified by:
        registerHandler in class SpanExporter
        Parameters:
        name - the name of the service handler. Must be unique for each service.
        handler - the service handler that is called for each ended sampled span.
      • unregisterHandler

        public void unregisterHandler​(java.lang.String name)
        Description copied from class: SpanExporter
        Unregisters the service handler with the provided name.
        Specified by:
        unregisterHandler in class SpanExporter
        Parameters:
        name - the name of the service handler that will be unregistered.
      • flush

        void flush()
      • shutdown

        void shutdown()
      • getServiceExporterThread

        java.lang.Thread getServiceExporterThread()
      • getDroppedSpans

        long getDroppedSpans()
      • getReferencedSpans

        long getReferencedSpans()
      • getPushedSpans

        long getPushedSpans()