24#ifndef COMPONENTS_SERVICES_BITS_PSI_METRIC_BITS_H
25#define COMPONENTS_SERVICES_BITS_PSI_METRIC_BITS_H
50#define METRIC_UNIT_BYTES "By"
51#define METRIC_UNIT_MILLISECONDS "ms"
52#define METRIC_UNIT_SECONDS "s"
59 const char *attr_name,
60 const char *attr_value);
63 void *delivery_context, int64_t value,
const char **attr_name_array,
64 const char **attr_value_array,
size_t size);
70 void *delivery_context,
double value,
const char *attr_name,
71 const char *attr_value);
74 void *delivery_context,
double value,
const char **attr_name_array,
75 const char **attr_value_array,
size_t size);
99 void *delivery_context);
109#define PSI_METRIC_VERSION_1 1
116#define PSI_CURRENT_METRIC_VERSION 1
static int count
Definition: myisam_ftdump.cc:45
size_t size(const char *const c)
Definition: base64.h:46
constexpr size_t MAX_METRIC_DESCRIPTION_LEN
Definition: psi_metric_bits.h:47
void(* measurement_delivery_double_1_callback_t)(void *delivery_context, double value, const char *attr_name, const char *attr_value)
Definition: psi_metric_bits.h:69
void(* measurement_delivery_int64_0_callback_t)(void *delivery_context, int64_t value)
Definition: psi_metric_bits.h:54
MetricOTELType
Definition: psi_metric_bits.h:32
@ ASYNC_UPDOWN_COUNTER
Definition: psi_metric_bits.h:34
@ ASYNC_COUNTER
Definition: psi_metric_bits.h:33
@ ASYNC_GAUGE_COUNTER
Definition: psi_metric_bits.h:35
unsigned int PSI_meter_key
Definition: psi_metric_bits.h:101
PSI_metric_info_v1 PSI_metric_info
Definition: psi_metric_bits.h:209
MeterNotifyType
Definition: psi_metric_bits.h:40
@ METER_REMOVED
Definition: psi_metric_bits.h:40
@ METER_UPDATE
Definition: psi_metric_bits.h:40
@ METER_ADDED
Definition: psi_metric_bits.h:40
constexpr size_t MAX_METRIC_NAME_LEN
Definition: psi_metric_bits.h:45
constexpr size_t MAX_METER_DESCRIPTION_LEN
Definition: psi_metric_bits.h:44
void(* meter_registration_changes_v1_t)(const char *meter, MeterNotifyType change)
Callback function to notify of changes within the set of registered meters.
Definition: psi_metric_bits.h:178
void(* measurement_delivery_double_0_callback_t)(void *delivery_context, double value)
Definition: psi_metric_bits.h:66
void(* unregister_meters_v1_t)(PSI_meter_info_v1 *info, size_t count)
Unregister a batch of meters and their telemetry metric sources.
Definition: psi_metric_bits.h:170
void(* measurement_delivery_double_n_callback_t)(void *delivery_context, double value, const char **attr_name_array, const char **attr_value_array, size_t size)
Definition: psi_metric_bits.h:73
constexpr size_t MAX_METER_NAME_LEN
Definition: psi_metric_bits.h:43
void(* register_meters_v1_t)(PSI_meter_info_v1 *info, size_t count)
Register a batch of telemetry meters (metric groups), each with its metrics.
Definition: psi_metric_bits.h:162
MetricNumType
Definition: psi_metric_bits.h:38
@ METRIC_INTEGER
Definition: psi_metric_bits.h:38
@ METRIC_DOUBLE
Definition: psi_metric_bits.h:38
void(* unregister_change_notification_v1_t)(meter_registration_changes_v1_t callback)
Unregister a notification callback to track changes in the set of registered meters.
Definition: psi_metric_bits.h:196
unsigned int PSI_metric_key
Definition: psi_metric_bits.h:102
PSI_meter_info_v1 PSI_meter_info
Definition: psi_metric_bits.h:212
void(* measurement_delivery_int64_1_callback_t)(void *delivery_context, int64_t value, const char *attr_name, const char *attr_value)
Definition: psi_metric_bits.h:57
void(* measurement_callback_t)(void *measurement_context, measurement_delivery_callback_t delivery, void *delivery_context)
Single metric measurement callback can return multiple measurement values.
Definition: psi_metric_bits.h:97
void(* measurement_delivery_int64_n_callback_t)(void *delivery_context, int64_t value, const char **attr_name_array, const char **attr_value_array, size_t size)
Definition: psi_metric_bits.h:62
void(* register_change_notification_v1_t)(meter_registration_changes_v1_t callback)
Register a notification callback to track changes in the set of registered meters.
Definition: psi_metric_bits.h:187
constexpr size_t MAX_METRIC_UNIT_LEN
Definition: psi_metric_bits.h:46
void(* send_change_notification_v1_t)(const char *meter, MeterNotifyType change)
Send a notification of changes in the set of registered meters.
Definition: psi_metric_bits.h:205
Define a meter source, storing char pointers requires the original strings to be valid for entire lif...
Definition: psi_metric_bits.h:143
unsigned int m_frequency
Definition: psi_metric_bits.h:146
PSI_meter_key m_key
Definition: psi_metric_bits.h:149
const char * m_description
Definition: psi_metric_bits.h:145
PSI_metric_info_v1 * m_metrics
Definition: psi_metric_bits.h:152
unsigned int m_flags
Instrument flags.
Definition: psi_metric_bits.h:148
unsigned int m_metrics_size
Definition: psi_metric_bits.h:153
const char * m_meter
Definition: psi_metric_bits.h:144
Define a metric source, storing char pointers requires the original strings to be valid for entire li...
Definition: psi_metric_bits.h:124
void * m_measurement_context
Definition: psi_metric_bits.h:134
unsigned int m_flags
Instrument flags.
Definition: psi_metric_bits.h:131
MetricOTELType m_metric_type
Definition: psi_metric_bits.h:128
const char * m_description
Definition: psi_metric_bits.h:127
PSI_metric_key m_key
Definition: psi_metric_bits.h:132
MetricNumType m_num_type
Definition: psi_metric_bits.h:129
const char * m_unit
Definition: psi_metric_bits.h:126
measurement_callback_t m_measurement_callback
Definition: psi_metric_bits.h:133
const char * m_metric
Definition: psi_metric_bits.h:125
Definition: psi_metric_bits.h:77
measurement_delivery_int64_1_callback_t value_int64_attr
Definition: psi_metric_bits.h:79
measurement_delivery_double_0_callback_t value_double
Definition: psi_metric_bits.h:81
measurement_delivery_double_n_callback_t value_double_attrs
Definition: psi_metric_bits.h:83
measurement_delivery_int64_n_callback_t value_int64_attrs
Definition: psi_metric_bits.h:80
measurement_delivery_double_1_callback_t value_double_attr
Definition: psi_metric_bits.h:82
measurement_delivery_int64_0_callback_t value_int64
Definition: psi_metric_bits.h:78