Package io.opentelemetry.sdk.metrics
Class SdkLongHistogram.SdkLongHistogramBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.SdkLongHistogram.SdkLongHistogramBuilder
-
- All Implemented Interfaces:
ExtendedLongHistogramBuilder
,LongHistogramBuilder
- Enclosing class:
- SdkLongHistogram
static final class SdkLongHistogram.SdkLongHistogramBuilder extends java.lang.Object implements ExtendedLongHistogramBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private InstrumentBuilder
builder
-
Constructor Summary
Constructors Constructor Description SdkLongHistogramBuilder(SdkMeter sdkMeter, java.lang.String name, java.lang.String description, java.lang.String unit, Advice.AdviceBuilder adviceBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SdkLongHistogram
build()
Builds and returns a Histogram instrument with the configuration.ExtendedLongHistogramBuilder
setAttributesAdvice(java.util.List<AttributeKey<?>> attributes)
Specify the attribute advice, which suggests the recommended set of attribute keys to be used for this histogram.LongHistogramBuilder
setDescription(java.lang.String description)
Sets the description for this instrument.ExtendedLongHistogramBuilder
setExplicitBucketBoundariesAdvice(java.util.List<java.lang.Long> bucketBoundaries)
Set the explicit bucket buckets boundaries advice, which suggests the recommended set of explicit bucket boundaries for this histogram.LongHistogramBuilder
setUnit(java.lang.String unit)
Sets the unit of measure for this instrument.java.lang.String
toString()
-
-
-
Field Detail
-
builder
private final InstrumentBuilder builder
-
-
Constructor Detail
-
SdkLongHistogramBuilder
SdkLongHistogramBuilder(SdkMeter sdkMeter, java.lang.String name, java.lang.String description, java.lang.String unit, Advice.AdviceBuilder adviceBuilder)
-
-
Method Detail
-
setDescription
public LongHistogramBuilder setDescription(java.lang.String description)
Description copied from interface:LongHistogramBuilder
Sets the description for this instrument.- Specified by:
setDescription
in interfaceLongHistogramBuilder
- Parameters:
description
- The description.- See Also:
- Instrument Description
-
setUnit
public LongHistogramBuilder setUnit(java.lang.String unit)
Description copied from interface:LongHistogramBuilder
Sets the unit of measure for this instrument.- Specified by:
setUnit
in interfaceLongHistogramBuilder
- Parameters:
unit
- The unit. Instrument units must be 63 or fewer ASCII characters.- See Also:
- Instrument Unit
-
build
public SdkLongHistogram build()
Description copied from interface:LongHistogramBuilder
Builds and returns a Histogram instrument with the configuration.- Specified by:
build
in interfaceLongHistogramBuilder
- Returns:
- The Histogram instrument.
-
setExplicitBucketBoundariesAdvice
public ExtendedLongHistogramBuilder setExplicitBucketBoundariesAdvice(java.util.List<java.lang.Long> bucketBoundaries)
Description copied from interface:LongHistogramBuilder
Set the explicit bucket buckets boundaries advice, which suggests the recommended set of explicit bucket boundaries for this histogram.- Specified by:
setExplicitBucketBoundariesAdvice
in interfaceLongHistogramBuilder
- Parameters:
bucketBoundaries
- The explicit bucket boundaries advice.- See Also:
- Explicit bucket boundaries advisory parameter
-
setAttributesAdvice
public ExtendedLongHistogramBuilder setAttributesAdvice(java.util.List<AttributeKey<?>> attributes)
Description copied from interface:ExtendedLongHistogramBuilder
Specify the attribute advice, which suggests the recommended set of attribute keys to be used for this histogram.- Specified by:
setAttributesAdvice
in interfaceExtendedLongHistogramBuilder
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-