CosmosMicrometerMeterOptions Class
- java.
lang. Object - com.
azure. cosmos. models. CosmosMicrometerMeterOptions
- com.
public final class CosmosMicrometerMeterOptions
Options of a Cosmos client-side meter that can be used to enable/disable it, change the percentile and histogram capturing (if percentiles are applicable for the meter) and allows suppressing tags that are not desired.
Constructor Summary
| Constructor | Description |
|---|---|
| CosmosMicrometerMeterOptions() |
Instantiates new options for a specific Cosmos DB meter |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Cosmos |
applyDiagnosticThresholds(boolean isEnabled)
Sets a flag whether the diagnostic thresholds should be applied for this meter. |
|
Cosmos |
configurePercentiles(double[] percentiles)
Sets the percentiles that should be captured for this meter (when applicable) |
|
Cosmos |
enableHistograms(boolean isEnabled)
Sets the tags that should be used for this meter (when applicable) |
|
Cosmos |
setEnabled(boolean enabled)
Enables or disables this meter. |
|
Cosmos |
suppressTagNames(CosmosMetricTagName[] tags)
Sets the tags that should be used for this meter (when applicable) |
Methods inherited from java.lang.Object
Constructor Details
CosmosMicrometerMeterOptions
public CosmosMicrometerMeterOptions()
Instantiates new options for a specific Cosmos DB meter
Method Details
applyDiagnosticThresholds
public CosmosMicrometerMeterOptions applyDiagnosticThresholds(boolean isEnabled)
Sets a flag whether the diagnostic thresholds should be applied for this meter. If enabled a meter will only reflect operations violating diagnostic thresholds. This can be used to reduce the cardinality of dimensions (the number of time series a meter emits). Request-level metrics usually are used to capture metrics per backend endpoint/replica - a high cardinality dimension. Filtering by diagnostic thresholds reduces the overhead - but also means request-level metrics can only be used for debugging purposes - not for monitoring purposes. So, it is important to use the unfiltered operation-level metrics for health monitoring in this case.
Parameters:
- a flag indicating whether the diagnostic thresholds should be applied for this meter - when not specified the default provided in applyDiagnosticThresholdsForTransportLevelMeters(boolean isEnabled) is used.
Returns:
configurePercentiles
public CosmosMicrometerMeterOptions configurePercentiles(double[] percentiles)
Sets the percentiles that should be captured for this meter (when applicable)
Parameters:
- a flag indicating whether histogram publishing is enabled for this meter
Returns:
enableHistograms
public CosmosMicrometerMeterOptions enableHistograms(boolean isEnabled)
Sets the tags that should be used for this meter (when applicable)
Parameters:
- a flag indicating whether histogram publishing is enabled for this meter
Returns:
setEnabled
public CosmosMicrometerMeterOptions setEnabled(boolean enabled)
Enables or disables this meter. By default, meters are enabled.
Parameters:
true to enable the meter.
Returns:
MetricsOptions object.suppressTagNames
public CosmosMicrometerMeterOptions suppressTagNames(CosmosMetricTagName[] tags)
Sets the tags that should be used for this meter (when applicable)
Parameters:
- the tags to be used (when applicable) for this meter
Returns: