Interface IDriverMetricsProvider
Provides metric implementations.
Assembly: Cassandra.dll
Syntax
public interface IDriverMetricsProvider
Methods
Counter(string, IMetric)
Creates a counter metric. bucket
will contain the prefix configured with SetBucketPrefix(string),
session name and node's address. Node's address will only be in the bucket name when metric
is a NodeMetric.
Implementations can call object.Equals(object) to test if metric
is a particular NodeMetric or SessionMetric.
Declaration
IDriverCounter Counter(string bucket, IMetric metric)
Parameters
Type |
Name |
Description |
string |
bucket |
|
IMetric |
metric |
|
Returns
Gauge(string, IMetric, Func<double?>)
Creates a gauge metric. bucket
will contain the prefix configured with SetBucketPrefix(string),
session name and node's address. Node's address will only be in the bucket name when metric
is a NodeMetric.
Implementations can call object.Equals(object) to test if metric
is a particular NodeMetric or SessionMetric.
Declaration
IDriverGauge Gauge(string bucket, IMetric metric, Func<double?> valueProvider)
Parameters
Type |
Name |
Description |
string |
bucket |
|
IMetric |
metric |
|
Func<double?> |
valueProvider |
|
Returns
Meter(string, IMetric)
Creates a meter metric. bucket
will contain the prefix configured with SetBucketPrefix(string),
session name and node's address. Node's address will only be in the bucket name when metric
is a NodeMetric.
Implementations can call object.Equals(object) to test if metric
is a particular NodeMetric or SessionMetric.
Declaration
IDriverMeter Meter(string bucket, IMetric metric)
Parameters
Type |
Name |
Description |
string |
bucket |
|
IMetric |
metric |
|
Returns
ShutdownMetricsBucket(string)
Shutdowns/Disposes metrics created with the provided bucket
. This is especially useful to stop gauges which are supposed to run on a loop.
Declaration
void ShutdownMetricsBucket(string bucket)
Parameters
Type |
Name |
Description |
string |
bucket |
|
Timer(string, IMetric)
Creates a timer metric. bucket
will contain the prefix configured with SetBucketPrefix(string),
session name and node's address. Node's address will only be in the bucket name when metric
is a NodeMetric.
Implementations can call object.Equals(object) to test if metric
is a particular NodeMetric or SessionMetric.
Declaration
IDriverTimer Timer(string bucket, IMetric metric)
Parameters
Type |
Name |
Description |
string |
bucket |
|
IMetric |
metric |
|
Returns