Class MetricsCollector.SnapshotTextOptions.Builder
java.lang.Object
com.soklet.MetricsCollector.SnapshotTextOptions.Builder
- Enclosing class:
MetricsCollector.SnapshotTextOptions
Builder for
MetricsCollector.SnapshotTextOptions.
Defaults are MetricsCollector.SnapshotTextOptions.HistogramFormat.FULL_BUCKETS and includeZeroBuckets=true.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aMetricsCollector.SnapshotTextOptionsinstance.histogramFormat(@NonNull MetricsCollector.SnapshotTextOptions.HistogramFormat histogramFormat) Sets how histograms are rendered in the text snapshot.includeZeroBuckets(@Nullable Boolean includeZeroBuckets) Controls whether zero-count buckets are emitted.Sets an optional per-sample filter.
-
Method Details
-
metricFilter
public @NonNull MetricsCollector.SnapshotTextOptions.Builder metricFilter(@Nullable Predicate<MetricsCollector.SnapshotTextOptions.MetricSample> metricFilter) Sets an optional per-sample filter.- Parameters:
metricFilter- the filter to apply, ornullto disable filtering- Returns:
- this builder
-
histogramFormat
public @NonNull MetricsCollector.SnapshotTextOptions.Builder histogramFormat(@NonNull MetricsCollector.SnapshotTextOptions.HistogramFormat histogramFormat) Sets how histograms are rendered in the text snapshot.- Parameters:
histogramFormat- the histogram format- Returns:
- this builder
-
includeZeroBuckets
public @NonNull MetricsCollector.SnapshotTextOptions.Builder includeZeroBuckets(@Nullable Boolean includeZeroBuckets) Controls whether zero-count buckets are emitted.- Parameters:
includeZeroBuckets-trueto include zero-count buckets,falseto omit them- Returns:
- this builder
-
build
Builds aMetricsCollector.SnapshotTextOptionsinstance.- Returns:
- the built options
-