Class SpanExporter.Handler

java.lang.Object
io.opencensus.trace.export.SpanExporter.Handler
Direct Known Subclasses:
TestHandler, TimeLimitedHandler
Enclosing class:
SpanExporter

public abstract static class SpanExporter.Handler extends Object
An abstract class that allows different tracing services to export recorded data for sampled spans in their own format.

To export data this MUST be register to to the ExportComponent using SpanExporter.registerHandler(String, Handler).

Since:
0.5
  • Constructor Details

    • Handler

      public Handler()
  • Method Details

    • export

      public abstract void export(Collection<SpanData> spanDataList)
      Exports a list of sampled (see TraceOptions.isSampled()) Spans using the immutable representation SpanData.

      This may be called from a different thread than the one that called Span.end().

      Implementation SHOULD not block the calling thread. It should execute the export on a different thread if possible.

      Parameters:
      spanDataList - a list of SpanData objects to be exported.
      Since:
      0.5