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 Node.js Driver API Reference Modules metrics ClientMetrics

Caution

You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.

ClientMetrics¶

metrics~ClientMetrics

Represents a base class that is used to measure events from the server and the client as seen by the driver.

Source

metrics/client-metrics.js, line 9

Methods¶

onAuthenticationError(e)

Method invoked when an authentication error is obtained from the server.

Parameters:
Name Type Description
e AuthenticationError | Error

The error encountered.

Source

metrics/client-metrics.js, line 14

onClientTimeoutError(e)

Method invoked when an error (different than a server or client timeout, authentication or connection error) is encountered when executing a request.

Parameters:
Name Type Description
e OperationTimedOutError

The timeout error.

Source

metrics/client-metrics.js, line 21

onClientTimeoutRetry(e)

Method invoked when an execution is retried as a result of a client-level timeout.

Parameters:
Name Type Description
e Error

The error that caused the retry.

Source

metrics/client-metrics.js, line 58

onConnectionError(e)

Method invoked when there is a connection error.

Parameters:
Name Type Description
e Error

The error encountered.

Source

metrics/client-metrics.js, line 27

onIgnoreError(e)

Method invoked when an error is marked as ignored by the retry policy.

Parameters:
Name Type Description
e Error

The error that was ignored by the retry policy.

Source

metrics/client-metrics.js, line 89

onOtherError(e)

Method invoked when an error (different than a server or client timeout, authentication or connection error) is encountered when executing a request.

Parameters:
Name Type Description
e Error

The error encountered.

Source

metrics/client-metrics.js, line 34

onOtherErrorRetry(e)

Method invoked when an error (other than a server or client timeout) is retried.

Parameters:
Name Type Description
e Error

The error that caused the retry.

Source

metrics/client-metrics.js, line 64

onReadTimeoutError(e)

Method invoked when a read timeout error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

Source

metrics/client-metrics.js, line 40

onReadTimeoutRetry(e)

Method invoked when an execution is retried as a result of a read timeout from the server (coordinator to replica).

Parameters:
Name Type Description
e Error

The error that caused the retry.

Source

metrics/client-metrics.js, line 70

onResponse(latency)

Method invoked when any response is obtained, the response can be the result of a successful execution or a server-side error.

Parameters:
Name Type Description
latency Array<Number>

The latency represented in a [seconds, nanoseconds] tuple Array, where nanoseconds is the remaining part of the real time that can't be represented in second precision.

Source

metrics/client-metrics.js, line 109

onSpeculativeExecution()

Method invoked when a speculative execution is started.

Source

metrics/client-metrics.js, line 94

onSuccessfulResponse(latency)

Method invoked when a response is obtained successfully.

Parameters:
Name Type Description
latency Array<Number>

The latency represented in a [seconds, nanoseconds] tuple Array, where nanoseconds is the remaining part of the real time that can't be represented in second precision.

Source

metrics/client-metrics.js, line 101

onUnavailableError(e)

Method invoked when an unavailable error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

Source

metrics/client-metrics.js, line 52

onUnavailableRetry(e)

Method invoked when an execution is retried as a result of an unavailable error from the server.

Parameters:
Name Type Description
e Error

The error that caused the retry.

Source

metrics/client-metrics.js, line 76

onWriteTimeoutError(e)

Method invoked when a write timeout error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

Source

metrics/client-metrics.js, line 46

onWriteTimeoutRetry(e)

Method invoked when an execution is retried as a result of a write timeout from the server (coordinator to replica).

Parameters:
Name Type Description
e Error

The error that caused the retry.

Source

metrics/client-metrics.js, line 83

Was this page helpful?

PREVIOUS
DefaultMetrics
NEXT
policies
  • Create an issue
  • Edit this page

On this page

  • ClientMetrics
    • Methods
ScyllaDB Node.js Driver
Search Ask AI
  • main
    • main
    • v0.6.1
  • Getting Started
  • Statements
    • Executing CQL Statements - Best Practices
    • Unprepared Statements
    • Batch Statements
    • Parameterized queries
  • Fetching Large Result Sets
  • Logging
  • Policies
    • Load Balancing
    • Retry Policies
  • Authentication
  • Shutdown
  • Migration Guide
  • API Reference
    • Modules
      • auth
        • AuthProvider
        • Authenticator
        • PlainTextAuthProvider
      • concurrent
      • datastax
        • graph
        • search
      • errors
        • ArgumentError
        • AuthenticationError
        • BusyConnectionError
        • DriverInternalError
        • NoHostAvailableError
        • NotSupportedError
        • OperationTimedOutError
        • ResponseError
      • geometry
      • mapping
        • DefaultTableMappings
        • Mapper
        • ModelBatchItem
        • ModelMapper
        • Result
        • UnderscoreCqlToCamelCaseMappings
        • TableMappings
      • metadata
        • Aggregate
        • ClientState
        • ColumnMetadata
        • Index
        • KeyspaceMetadata
        • MaterializedView
        • Metadata
        • SchemaFunction
        • Strategy
        • TableMetadata
        • UdtField
        • UserDefinedType
      • metrics
        • DefaultMetrics
        • ClientMetrics
      • policies
        • addressResolution
          • AddressTranslator
          • EC2MultiRegionTranslator
          • MappingAddressTranslator
        • loadBalancing
          • AllowListPolicy
          • DCAwareRoundRobinPolicy
          • DefaultLoadBalancingPolicy
          • LegacyDefaultLoadBalancingPolicy
          • LoadBalancingConfig
          • LoadBalancingPolicy
          • RoundRobinPolicy
          • TokenAwarePolicy
        • reconnection
          • ConstantReconnectionPolicy
          • ExponentialReconnectionPolicy
          • ReconnectionPolicy
        • retry
          • FallthroughRetryPolicy
          • RetryPolicy
        • speculativeExecution
          • ConstantSpeculativeExecutionPolicy
          • NoSpeculativeExecutionPolicy
          • SpeculativeExecutionPolicy
        • timestampGeneration
          • MonotonicTimestampGenerator
          • TimestampGenerator
      • tracker
        • RequestLogger
        • RequestTracker
      • types
        • BigDecimal
        • Duration
        • InetAddress
        • Integer
        • LocalDate
        • Long
        • ResultSet
        • ResultStream
        • Row
        • TimeUuid
        • Tuple
        • Uuid
        • Vector
    • Classes
      • AddressResolver
      • ByteOrderedToken
      • Client
      • ColumnInfo
      • DateRange
      • DateRangeBound
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
      • Edge
      • Element
      • Encoder
      • EncoderMembers
      • ExecutionOptions
      • ExecutionProfile
      • FrameReader
      • GraphResultSet
      • HashSet
      • Host
      • HostMap
      • LineString
      • Murmur3Token
      • Path
      • Point
      • Polygon
      • Property
      • RandomToken
      • SslOptions
      • Token
      • TokenRange
      • Vertex
      • VertexProperty
    • Interfaces
    • Events
    • Global Functions and Constants
Docs Tutorials University Contact Us About Us
© 2026 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 20 Jun 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.2