Click or drag to resize

DriverMetricsOptionsSetBucketPrefix Method

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

Namespace:  Dse.Metrics
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public DriverMetricsOptions SetBucketPrefix(
	string bucketPrefix
)

Parameters

bucketPrefix
Type: SystemString

Return Value

Type: DriverMetricsOptions
See Also