Package com.linkedin.venice.stats
Class OpenTelemetryMetricsSetup.Builder
java.lang.Object
com.linkedin.venice.stats.OpenTelemetryMetricsSetup.Builder
- Enclosing class:
- OpenTelemetryMetricsSetup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCustomDimension(VeniceDimensionInterface dimensionValue) Add a custom dimension from aVeniceDimensionInterfaceenum value.build()Build: setup base dimensions and attributes, and determine if OTel metrics should be emitted.isTotalStats(boolean isTotalStats) Set whether this is for total stats (affects whether OTel metrics are emitted).setClusterName(String clusterName) Set the cluster name dimension.setHelixGroupId(int helixGroupId) Set the Helix group ID dimension.setOtelEnabledOverride(boolean otelEnabledOverride) Per-category gate for OTel metrics, applied on top of the global OTel config.setRegionName(String regionName) Set the region/datacenter name dimension.setRequestRetryType(RequestRetryType requestRetryType) Set the request retry type dimension.setRequestType(RequestType requestType) Set the request type dimension.setRouteName(String routeName) Set the route name dimension.setStoreName(String storeName) Set the store name dimension.setThreadPoolName(String threadPoolName) Set the thread pool name dimension.
-
Constructor Details
-
Builder
public Builder(io.tehuti.metrics.MetricsRepository metricsRepository)
-
-
Method Details
-
setStoreName
Set the store name dimension. -
setRequestType
Set the request type dimension. -
isTotalStats
Set whether this is for total stats (affects whether OTel metrics are emitted). -
setOtelEnabledOverride
Per-category gate for OTel metrics, applied on top of the global OTel config. OTel metrics are emitted only when both the global config and this override are enabled. Setting this tofalsedisables OTel for the stats class being built, even if the global config is enabled. Setting it totruehas no effect if the global config is disabled — it cannot re-enable OTel. -
setClusterName
Set the cluster name dimension. -
setRegionName
Set the region/datacenter name dimension. -
setRouteName
Set the route name dimension. -
setRequestRetryType
Set the request retry type dimension. -
setThreadPoolName
Set the thread pool name dimension. -
setHelixGroupId
Set the Helix group ID dimension. -
addCustomDimension
public OpenTelemetryMetricsSetup.Builder addCustomDimension(VeniceDimensionInterface dimensionValue) Add a custom dimension from aVeniceDimensionInterfaceenum value. Use this for component-specific dimensions that are not standard builder parameters (e.g., buffer type) that are used once or in a few places, to avoid bloating the builder with rarely-used parameters. The dimension key and value are derived from the enum.- Parameters:
dimensionValue- the enum value providing both dimension key and value; must not be null- Throws:
IllegalArgumentException- if dimensionValue is null
-
build
Build: setup base dimensions and attributes, and determine if OTel metrics should be emitted.- Returns:
- OpenTelemetryMetricsSetupInfo containing this information
-