Class MetricsFilter.Builder
- java.lang.Object
-
- org.apache.beam.sdk.metrics.MetricsFilter.Builder
-
- Enclosing class:
- MetricsFilter
public abstract static class MetricsFilter.Builder extends java.lang.Object
Builder for creating aMetricsFilter
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MetricsFilter.Builder
addNameFilter(MetricNameFilter nameFilter)
Add aMetricNameFilter
.MetricsFilter.Builder
addStep(java.lang.String step)
Add a step filter.abstract MetricsFilter
build()
protected abstract org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet.Builder<MetricNameFilter>
immutableNamesBuilder()
protected abstract org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet.Builder<java.lang.String>
immutableStepsBuilder()
-
-
-
Method Detail
-
immutableNamesBuilder
protected abstract org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet.Builder<MetricNameFilter> immutableNamesBuilder()
-
immutableStepsBuilder
protected abstract org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet.Builder<java.lang.String> immutableStepsBuilder()
-
addNameFilter
public MetricsFilter.Builder addNameFilter(MetricNameFilter nameFilter)
Add aMetricNameFilter
.If no name filters are specified then all metric names will be included
If one or more name filters are specified, then only metrics that match one or more of the filters will be included.
-
addStep
public MetricsFilter.Builder addStep(java.lang.String step)
Add a step filter.If no steps are specified then metrics will be included for all steps.
If one or more steps are specified, then metrics will be included if they are part of any of the specified steps.
The step names of metrics are identified as a path within the pipeline. So for example, a transform that is applied with the name "bar" in a composite that was applied with the name "foo" would have a step name of "foo/bar".
Step name filters may be either a full name (such as "foo/bar/baz") or a partial name such as "foo", "bar" or "foo/bar". However, each component of the step name must be completely matched, so the filter "foo" will not match a step name such as "fool/bar/foot"
TODO(https://github.com/apache/beam/issues/20919): Beam does not guarantee a specific format for step IDs hence we should not assume a "foo/bar/baz" format here.
-
build
public abstract MetricsFilter build()
-
-