Class: CipherStash::Client::Metrics
- Inherits:
-
Object
- Object
- CipherStash::Client::Metrics
- Defined in:
- lib/cipherstash/client/metrics.rb
Overview
A generic interface to the metrics of a CipherStash client.
We try to collect comprehensive numeric information about the performance and behaviour of a CipherStash client, which are collected into a Metrics instance. This instance, depending on what sort it is, can either expose the metrics for collection at a point convenient to the code that uses the client (as the Hash metrics subclass does), or it can feed the numeric data directly to something that exposes said data to an external system for periodic collection (the Prometheus metrics subclass does this).
You should not use this class directly; instead, you should instantiate the appropriate subclass in this namespace for your needs.
Available Metrics
A CipherStash::Client::Metrics instance provides the following metrics:
creation_timestamp_seconds(gauge) the (floating-point) number of seconds since the Unix epoch at which this instance of CipherStash::Client was created.method_time_total_seconds(counter) the (floating-point) number of seconds that have been spent in all calls to this client and its collections. Labelled by the method name.rpc_time_total_seconds(counter) the (floating-point) number of seconds that this client has spent making RPC calls to the data-service. Labelled by the RPC operation being undertaken.crypto_time_total_seconds(counter) the (floating-point) number of seconds that the client has spent performing cryptographic operations, including communicating with an external key-management service (if appropriate). Labelled by the operation ("encrypt" or "decrypt") and RPC involved.
Direct Known Subclasses
Defined Under Namespace
Classes: Hash