Class BufferingSpanReporter
java.lang.Object
org.springframework.cloud.sleuth.autoconfig.actuate.BufferingSpanReporter
- All Implemented Interfaces:
org.springframework.cloud.sleuth.exporter.SpanReporter
public class BufferingSpanReporter
extends Object
implements org.springframework.cloud.sleuth.exporter.SpanReporter
A
SpanReporter that buffers finished spans.- Since:
- 3.1.0
- Author:
- Marcin Grzejszczak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.cloud.sleuth.exporter.FinishedSpan>Return thetimelineby pulling spans from the buffer.List<org.springframework.cloud.sleuth.exporter.FinishedSpan>Return a snapshot of currently buffered spans.voidreport(org.springframework.cloud.sleuth.exporter.FinishedSpan span)
-
Constructor Details
-
BufferingSpanReporter
public BufferingSpanReporter(int capacity)
-
-
Method Details
-
getFinishedSpans
Return a snapshot of currently buffered spans.This will not remove spans from the buffer, see
drainFinishedSpans()()} for its counterpart.- Returns:
- a snapshot of currently buffered spans.
-
drainFinishedSpans
Return thetimelineby pulling spans from the buffer.This removes steps from the buffer, see
getFinishedSpans()for its read-only counterpart.- Returns:
- buffered steps drained from the buffer.
-
report
public void report(org.springframework.cloud.sleuth.exporter.FinishedSpan span) - Specified by:
reportin interfaceorg.springframework.cloud.sleuth.exporter.SpanReporter
-