ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB Rust Driver Driver metrics
For AI agents: a documentation index is available at https://rust-driver.docs.scylladb.com/v1.7.0/llms.txt. A Markdown version of this page is at https://rust-driver.docs.scylladb.com/v1.7.0/metrics/metrics.md.

Driver metrics¶

This feature is available only under the crate feature metrics.

During operation the driver collects various metrics.

They can be accessed at any moment using Session::get_metrics().

Please note that those are driver-side metrics, not server-side. This means that latencies reported here will be different, because they also include the round trip time of a request and driver-side processing.

If you need server-side metrics, please look into Scylla Monitoring Stack.

Collected metrics:¶

  • Query latencies

  • Total number of nonpaged queries

  • Number of errors during nonpaged queries

  • Total number of paged queries

  • Number of errors during paged queries

  • Number of retries

  • Latency histogram statistics (min, max, mean, standard deviation, percentiles)

  • Rates of queries per second in various time frames

  • Number of active connections, and connection and request timeouts

Example¶

let metrics = session.get_metrics();

println!("Queries requested: {}", metrics.get_queries_num());
println!("Iter queries requested: {}", metrics.get_queries_iter_num());
println!("Errors occurred: {}", metrics.get_errors_num());
println!("Iter errors occurred: {}", metrics.get_errors_iter_num());
println!("Average latency: {}", metrics.get_latency_avg_ms()?);
println!(
    "99 latency percentile: {}",
    metrics.get_latency_percentile_ms(99.0)?
);

let snapshot = metrics.get_snapshot()?;
println!("Min: {}", snapshot.min);
println!("Max: {}", snapshot.max);
println!("Mean: {}", snapshot.mean);
println!("Standard deviation: {}", snapshot.stddev);
println!("Median: {}", snapshot.median);
println!("75th percentile: {}", snapshot.percentile_75);
println!("95th percentile: {}", snapshot.percentile_95);
println!("98th percentile: {}", snapshot.percentile_98);
println!("99th percentile: {}", snapshot.percentile_99);
println!("99.9th percentile: {}", snapshot.percentile_99_9);

println!("Mean rate: {}", metrics.get_mean_rate());
println!("One minute rate: {}", metrics.get_one_minute_rate());
println!("Five minute rate: {}", metrics.get_five_minute_rate());
println!("Fifteen minute rate: {}", metrics.get_fifteen_minute_rate());

println!("Total connections: {}", metrics.get_total_connections());
println!("Connection timeouts: {}", metrics.get_connection_timeouts());
println!("Requests timeouts: {}", metrics.get_request_timeouts());

Was this page helpful?

PREVIOUS
Percentile speculative execution
NEXT
Migration guides
  • Create an issue
  • Edit this page

On this page

  • Driver metrics
    • Collected metrics:
    • Example
ScyllaDB Rust Driver
Search Ask AI
  • v1.7.0
    • main
    • v1.7.0
    • v1.6.0
    • v1.5.0
    • v1.4.1
    • v1.4.0
    • v1.3.1
    • v1.3.0
    • v1.2.0
  • ScyllaDB Rust Driver
  • Quick Start
    • Creating a project
    • Connecting and running a simple query
    • Running ScyllaDB using Docker
  • Connecting to the cluster
    • Compression
    • Authentication
    • TLS
    • Client Routes (Private Networking)
  • Executing CQL statements - best practices
    • Unprepared statement
    • Statement values
    • Query result
    • Prepared statement
    • Batch statement
    • Paged query
    • USE keyspace
    • Schema agreement
    • Lightweight transaction (LWT) statement
    • Request timeouts
    • Timestamp generators
  • Execution profiles
    • Creating a profile and setting it
    • All options supported by a profile
    • Priorities of execution settings
    • Remapping execution profile handles
  • Data Types
    • Bool, Tinyint, Smallint, Int, Bigint, Float, Double
    • Ascii, Text, Varchar
    • Counter
    • Blob
    • Inet
    • Uuid
    • Timeuuid
    • Date
    • Time
    • Timestamp
    • Duration
    • Decimal
    • Varint
    • List, Set, Map
    • Tuple
    • User defined types
    • Vector
  • Load balancing
    • DefaultPolicy
  • Retry policy configuration
    • Fallthrough retry policy
    • Default retry policy
    • Downgrading consistency retry policy
  • Speculative execution
    • Simple speculative execution
    • Percentile speculative execution
  • Driver metrics
  • Migration guides
    • Adjusting code to changes in serialization API introduced in 0.11
    • Adjusting code to changes in deserialization API introduced in 0.15
  • Logging
  • Query tracing
    • Tracing a simple/prepared/batch query
    • Tracing a paged query
    • Tracing Session::prepare
    • Query Execution History
  • Schema
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 17 July 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.3