Class ServiceMetricEvent.Builder
java.lang.Object
org.apache.druid.java.util.emitter.service.ServiceEventBuilder<ServiceMetricEvent>
org.apache.druid.java.util.emitter.service.ServiceMetricEvent.Builder
- Enclosing class:
- ServiceMetricEvent
Builder for a
ServiceMetricEvent. This builder can be used for
building only one event.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDimension(String dim) setCreatedTime(org.joda.time.DateTime createdTime) setDimension(String dim, Object value) Adds a dimension to be emitted with this metric event.setDimension(String dim, String[] values) setDimensionIfNotNull(String dim, Object value) Adds a dimension to be emitted with this metric event, only if the given value is not null.Methods inherited from class org.apache.druid.java.util.emitter.service.ServiceEventBuilder
build
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setFeed
-
setDimension
-
setDimensionIfNotNull
Adds a dimension to be emitted with this metric event, only if the given value is not null.- Throws:
IAE- if the dimension name is null.
-
setDimension
Adds a dimension to be emitted with this metric event.- Throws:
IAE- if the dimension name or the given value is null.
-
getDimension
-
setMetric
-
setCreatedTime
-
build
public ServiceMetricEvent build(com.google.common.collect.ImmutableMap<String, String> serviceDimensions) - Specified by:
buildin classServiceEventBuilder<ServiceMetricEvent>
-