Package io.opentelemetry.android.export
Class FilteringSpanExporterBuilder
-
- All Implemented Interfaces:
public final class FilteringSpanExporterBuilder
-
-
Method Summary
Modifier and Type Method Description final FilteringSpanExporterBuilderrejectSpansNamed(String name)Creates a SpanExporter that will not export any spans whose name matches the given name. final FilteringSpanExporterBuilderrejectSpansNamed(Predicate<String> spanNamePredicate)Creates a SpanExporter that will not export any spans whose name matches the given predicate. final FilteringSpanExporterBuilderrejectSpansWithNameContaining(String substring)Creates a SpanExporter that will not export any spans whose name contains the given substring. final FilteringSpanExporterBuilderrejecting(Predicate<SpanData> predicate)Creates a span exporter that will not export any spans whose SpanData matches the rejecting predicate. final FilteringSpanExporterBuilderrejectSpansWithAttributesMatching(Map<AttributeKey<?>, Predicate<?>> attrRejection)final SpanExporterbuild()-
-
Method Detail
-
rejectSpansNamed
final FilteringSpanExporterBuilder rejectSpansNamed(String name)
Creates a SpanExporter that will not export any spans whose name matches the given name. All other spans will be exported by the delegate.
- Parameters:
name-Entire case sensitive span name to match for exclusion
- Returns:
a SpanExporter
-
rejectSpansNamed
final FilteringSpanExporterBuilder rejectSpansNamed(Predicate<String> spanNamePredicate)
Creates a SpanExporter that will not export any spans whose name matches the given predicate. All other spans will be exported by the delegate.
- Parameters:
spanNamePredicate-predicate to test the span name atainst
- Returns:
a SpanExporter
-
rejectSpansWithNameContaining
final FilteringSpanExporterBuilder rejectSpansWithNameContaining(String substring)
Creates a SpanExporter that will not export any spans whose name contains the given substring. All other spans will be exported by the delegate.
- Parameters:
substring-Substring go match within the span name
- Returns:
a SpanExporter
-
rejecting
final FilteringSpanExporterBuilder rejecting(Predicate<SpanData> predicate)
Creates a span exporter that will not export any spans whose SpanData matches the rejecting predicate.
- Parameters:
predicate- A predicate that returns true when a span is to be rejected- Returns:
this
-
rejectSpansWithAttributesMatching
final FilteringSpanExporterBuilder rejectSpansWithAttributesMatching(Map<AttributeKey<?>, Predicate<?>> attrRejection)
-
build
final SpanExporter build()
-
-
-
-