Drivers metrics

DataStax drivers expose metrics through different libraries and APIs depending on the language.

Whether in the process of developing an application or deploying the solution in production, it is critical to have systems in place that provide insights into the performance of the application. Many modern applications are critical to maintaining a business’s value. It is vitally important to effectively monitor and alert operators when systems are degrading. A framework for the application monitoring allows for greater ease when tracing the source of performance issues.

For example, an organization uses DSE OpsCenter to manage a DataStax Enterprise deployment. The operators receive an alert that there is a spike in latency on the server side. If application monitoring is also in place, operators investigating the issue could narrowed the latency to a single DataStax driver instance, and then evaluate how to fix the latency problem.

C/C++

C#

Java

Node.js

PHP (not supported)

Python

Ruby (not supported)

C/C++

The C/C++ driver tracks its metrics through an internal object called CassMetrics. This object contains information about requests (latency and throughput), stats (connections), and errors (timeouts). The DSE C/C++ Driver also exposes information for speculative executions through a CassSpeculativeExecutionMetrics object.

Java

The Java driver delivers its internal measurements through the Dropwizard Metrics library. For all versions of the Java Driver, metrics are exposed through a MetricRegistry. The reporter options include JMX, JSON (via a servlet), stdout, CSV files, SLF4J logs, and Graphite. See the Dropwizard Documentation for more details.

Node.js

The Node.js driver exposes several internal driver metrics in the form of counters in 2 different ways:

  • A default implementation which leverages the Node.js events API to expose different counter increments and push it in your existing application metrics toolkit.

  • A ClientMetrics interface that can be used by metrics libraries, service providers and the community to implement support for existing toolkits like metrics, datadog, prometheus, and measured.

Python

The Python driver uses the scales library for its metrics. Metrics collection is not enabled by default in the Python Driver. To use these metrics, create the Cluster object with metrics_enabled set to True. To view the reported statistics, use a simple HTTP server for spot checking the metrics. A more robust solution for collecting and reporting to Graphite is also supported via a GraphitePusher.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com