Click or drag to resize

DriverMetricsOptions Methods

The DriverMetricsOptions type exposes the following members.

Methods
  NameDescription
Public methodSetBucketPrefix
Prepends a prefix to the bucket name for all metrics. The way the bucket name and metric name parameters are used depends on the IDriverMetricsProvider that is provided to the builder. In the case of the provider based on App.Metrics available in the Dse.AppMetrics package, the bucket name will be concatenated with the metric name (separated by a dot), which makes the full metric path like this:
Format: <bucket-prefix>.<bucket-name>.<metric-name>
Here is how the full metric path will look like for Retries in practice with the AppMetrics provider:
// Set metric prefix
var cluster = 
    DseCluster.Builder()
           .AddContactPoint("127.0.0.1")
           .WithSessionName("session")
           .WithMetrics(
               metrics.CreateDriverMetricsProvider(),
               new DriverMetricsOptions().SetBucketPrefix("web.app"))
           .Build();

// Resulting metric name for the NodeMetric.Counters.Retries metric:
web.app.session.nodes.127_0_0_1:9042.retries.total
Public methodSetEnabledNodeMetrics
Enables specific node metrics. The available node metrics can be found as static readonly properties in the NodeMetric class, e.g., BytesSent. There is also a property that returns a collection with the default node metrics (DefaultNodeMetrics) and one with all node metrics (AllNodeMetrics).
Public methodSetEnabledSessionMetrics
Enables specific session metrics. The available session metrics can be found as static readonly properties in the SessionMetric class, e.g., BytesSent. There is also a property that returns a collection with the default session metrics (DefaultSessionMetrics) and one with all session metrics (AllSessionMetrics).
Top
See Also