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.
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.
The Java driver delivers its internal measurements through the Dropwizard Metrics library.
For all versions of the Java Driver, metrics are exposed through a
The reporter options include JMX, JSON (via a servlet), stdout, CSV files, SLF4J logs, and Graphite.
See the Dropwizard Documentation for more details.
The C# driver offers an extension package based on the App.Metrics library. Application developers can use to export metrics to a monitoring tool.
The Node.js driver exposes several internal driver metrics in the form of counters in two 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.
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
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.