Class DriverAppMetricsOptions
Options related to the app metrics provider. Currently the existing options are used to configure the HdrHistogram used internally for Timer metrics.
Inheritance
Inherited Members
Namespace: Cassandra.AppMetrics
Assembly: Cassandra.AppMetrics.dll
Syntax
public class DriverAppMetricsOptions
Properties
HighestLatencyMilliseconds
See SetHighestLatencyMilliseconds(int) for information about this property.
Declaration
public int HighestLatencyMilliseconds { get; }
Property Value
Type | Description |
---|---|
int |
RefreshIntervalMilliseconds
See SetRefreshIntervalMilliseconds(int) for information about this property.
Declaration
public int RefreshIntervalMilliseconds { get; }
Property Value
Type | Description |
---|---|
int |
SignificantDigits
See SetSignificantDigits(int) for information about this property.
Declaration
public int SignificantDigits { get; }
Property Value
Type | Description |
---|---|
int |
TimersTimeUnit
See SetTimersTimeUnit(TimeUnit) for information about this property.
Declaration
public TimeUnit TimersTimeUnit { get; }
Property Value
Type | Description |
---|---|
TimeUnit |
Methods
SetHighestLatencyMilliseconds(int)
The largest latency that we expect to record.
This should be slightly higher than ReadTimeoutMillis and WithQueryTimeout(int) (in theory, readings can't be higher than the timeout, but there might be a small overhead due to internal scheduling).
This is used to scale internal data structures. If a higher recording is encountered at runtime, it is discarded and a warning is logged.
This property defaults to 30000 milliseconds, i.e., 30 seconds.
Declaration
public DriverAppMetricsOptions SetHighestLatencyMilliseconds(int highestLatencyMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
int | highestLatencyMilliseconds |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |
SetRefreshIntervalMilliseconds(int)
The interval at which percentile data is refreshed.
The driver records latency data in a "live" histogram, and serves results from a cached snapshot. Each time the snapshot gets older than the interval, the two are switched. Note that this switch happens upon fetching the metrics, so if you never fetch the recording interval might grow higher (that shouldn't be an issue in a production environment because you would typically have a metrics reporter that exports to a monitoring tool at a regular interval).
In practice, this means that if you set this to 10 seconds, you're looking at data from a 10-second interval in the past, that is at most 10 seconds old. If you fetch the metrics at a faster pace, you will observe the same data for 10 seconds until the interval expires.
This property defaults to 10000 milliseconds, i.e., 10 seconds.
Declaration
public DriverAppMetricsOptions SetRefreshIntervalMilliseconds(int refreshIntervalMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
int | refreshIntervalMilliseconds |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |
SetSignificantDigits(int)
The number of significant decimal digits to which internal structures will maintain value resolution and separation (for example, 3 means that recordings up to 1 second will be recorded with a resolution of 1 millisecond or better). This must be between 0 and 5. If the value is out of range, an exception is thrown.
Declaration
public DriverAppMetricsOptions SetSignificantDigits(int digits)
Parameters
Type | Name | Description |
---|---|---|
int | digits |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |
SetTimersTimeUnit(TimeUnit)
Time unit to use for Timer metrics. This property defaults to App.Metrics.TimeUnit.Nanoseconds.
Declaration
public DriverAppMetricsOptions SetTimersTimeUnit(TimeUnit timeUnit)
Parameters
Type | Name | Description |
---|---|---|
TimeUnit | timeUnit |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |