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: Dse.AppMetrics
Assembly: Dse.AppMetrics.dll
Syntax
public class DriverAppMetricsOptions
Properties
HighestLatencyMilliseconds
See SetHighestLatencyMilliseconds(Int32) for information about this property.
Declaration
public int HighestLatencyMilliseconds { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RefreshIntervalMilliseconds
See SetRefreshIntervalMilliseconds(Int32) for information about this property.
Declaration
public int RefreshIntervalMilliseconds { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
SignificantDigits
See SetSignificantDigits(Int32) for information about this property.
Declaration
public int SignificantDigits { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TimersTimeUnit
See SetTimersTimeUnit(TimeUnit) for information about this property.
Declaration
public TimeUnit TimersTimeUnit { get; }
Property Value
Type | Description |
---|---|
App.Metrics.TimeUnit |
Methods
SetHighestLatencyMilliseconds(Int32)
The largest latency that we expect to record.
This should be slightly higher than ReadTimeoutMillis and WithQueryTimeout(Int32) (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 |
---|---|---|
System.Int32 | highestLatencyMilliseconds |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |
SetRefreshIntervalMilliseconds(Int32)
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 |
---|---|---|
System.Int32 | refreshIntervalMilliseconds |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |
SetSignificantDigits(Int32)
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 |
---|---|---|
System.Int32 | 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 |
---|---|---|
App.Metrics.TimeUnit | timeUnit |
Returns
Type | Description |
---|---|
DriverAppMetricsOptions |