Package io.opentelemetry.contrib.filter
Class ErrorSpanFilter
java.lang.Object
io.opentelemetry.contrib.filter.ErrorSpanFilter
- All Implemented Interfaces:
SpanFilter
A
SpanFilter that matches spans with StatusCode.ERROR, causing all
batch-colocated spans sharing the same trace ID to be exported.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldKeep(io.opentelemetry.sdk.trace.data.SpanData spanData) Evaluates whether the given span is interesting enough to keep its trace's spans in the batch.
-
Constructor Details
-
ErrorSpanFilter
public ErrorSpanFilter()
-
-
Method Details
-
shouldKeep
public boolean shouldKeep(io.opentelemetry.sdk.trace.data.SpanData spanData) Description copied from interface:SpanFilterEvaluates whether the given span is interesting enough to keep its trace's spans in the batch.- Specified by:
shouldKeepin interfaceSpanFilter- Parameters:
spanData- the span to evaluate- Returns:
trueif this span should cause its trace's batch-colocated spans to be exported
-