ores.telemetry.nats_samples

Table of Contents

The NATS sampling surface: two read-only queries, one over the server samples and one over the stream samples.

These are operations rather than entity verbs. Both replies are computed from the stored samples rather than addressed by key, so no caller reaches one row by primary key.

1. Physical space

The shell commands are switched off. The shell has no telemetry part, so a generated unit would have nowhere to land. These reads answer the operations dashboard, which is where a person meets NATS server and stream samples.

2. Includes

#include <chrono>
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>

3. Messages

3.1. nats_server_sample

/**
 * @brief A single point-in-time sample of NATS server-level metrics.
 */

3.1.1. sampled_at

/**
 * @brief When this sample was taken.
 */

3.1.2. in_msgs

/**
 * @brief Total inbound messages since server start.
 */

3.1.3. out_msgs

/**
 * @brief Total outbound messages since server start.
 */

3.1.4. in_bytes

/**
 * @brief Total inbound bytes since server start.
 */

3.1.5. out_bytes

/**
 * @brief Total outbound bytes since server start.
 */

3.1.6. connections

/**
 * @brief Current number of client connections.
 */

3.1.7. mem_bytes

/**
 * @brief Server process resident memory in bytes.
 */

3.1.8. slow_consumers

/**
 * @brief Number of slow consumers detected since server start.
 */

3.2. nats_stream_sample

/**
 * @brief A single point-in-time sample of a JetStream stream's metrics.
 */

3.2.1. sampled_at

/**
 * @brief When this sample was taken.
 */

3.2.2. stream_name

/**
 * @brief JetStream stream name, for example @c ORES_TRADES.
 */

3.2.3. messages

/**
 * @brief Number of messages currently stored in the stream.
 */

3.2.4. bytes

/**
 * @brief Total bytes currently stored in the stream.
 */

3.2.5. consumer_count

/**
 * @brief Number of active consumers on this stream.
 */

3.3. nats_server_samples_query

/**
 * @brief Query parameters for retrieving NATS server samples.
 */

3.3.1. start_time

/**
 * @brief Start of the time range, inclusive.
 */

3.3.2. end_time

/**
 * @brief End of the time range, exclusive.
 */

3.3.3. limit

/**
 * @brief Maximum number of results to return.
 */

3.4. nats_stream_samples_query

/**
 * @brief Query parameters for retrieving NATS stream samples.
 */

3.4.1. stream_name

/**
 * @brief JetStream stream name to query.
 */

3.4.2. start_time

/**
 * @brief Start of the time range, inclusive.
 */

3.4.3. end_time

/**
 * @brief End of the time range, exclusive.
 */

3.4.4. limit

/**
 * @brief Maximum number of results to return.
 */

3.5. get_nats_server_samples_request

/**
 * @brief Asks for the NATS server samples in a time range.
 */

3.5.1. query

/**
 * @brief The time range and limit the read applies.
 */

3.6. get_nats_server_samples_response

/**
 * @brief The NATS server samples the query selected.
 */

3.6.1. success

/**
 * @brief Whether the samples were read.
 */

3.6.2. message

/**
 * @brief Why they were not, when they were not.
 */

3.6.3. samples

/**
 * @brief The server samples the read returned.
 */

3.7. get_nats_stream_samples_request

/**
 * @brief Asks for one stream's samples in a time range.
 */

3.7.1. query

/**
 * @brief The stream, time range and limit the read applies.
 */

3.8. get_nats_stream_samples_response

/**
 * @brief The NATS stream samples the query selected.
 */

3.8.1. success

/**
 * @brief Whether the samples were read.
 */

3.8.2. message

/**
 * @brief Why they were not, when they were not.
 */

3.8.3. samples

/**
 * @brief The stream samples the read returned.
 */

4. See also

Emacs 29.3 (Org mode 9.6.15)