MySQL 9.0.0
Source Code Documentation
server_telemetry_metrics_bits.h File Reference
#include <cstddef>
#include <cstdint>
#include <mysql/components/service.h>
#include <mysql/components/services/mysql_string.h>
#include "psi_metric_bits.h"

Go to the source code of this file.

Typedefs

typedef struct telemetry_meters_iterator_imp * telemetry_meters_iterator
 
typedef struct telemetry_metrics_iterator_imp * telemetry_metrics_iterator
 
typedef bool(* metrics_iterator_create_t) (const char *meter, telemetry_metrics_iterator *iterator)
 Initialize Telemetry Metric iterator object to enumerate metrics and read measurement values, pointing to 1st matching metric. More...
 
typedef bool(* metrics_iterator_destroy_t) (telemetry_metrics_iterator iterator)
 Uninitialize Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_advance_t) (telemetry_metrics_iterator iterator)
 Advance Telemetry Metric iterator to next element. More...
 
typedef bool(* metrics_iterator_get_group_t) (telemetry_metrics_iterator iterator, my_h_string *out_group_handle)
 Return group name for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_name_t) (telemetry_metrics_iterator iterator, my_h_string *out_name_handle)
 Return metric name for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_value_t) (telemetry_metrics_iterator iterator, measurement_delivery_callback_t delivery, void *delivery_context)
 Return metric name for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_description_t) (telemetry_metrics_iterator iterator, my_h_string *out_desc_handle)
 Return metric description for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_unit_t) (telemetry_metrics_iterator iterator, my_h_string *out_unit_handle)
 Return metric unit for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_numeric_type_t) (telemetry_metrics_iterator iterator, MetricNumType &numeric)
 Return metric numeric type for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_metric_type_t) (telemetry_metrics_iterator iterator, MetricOTELType &metric_type)
 Return metric OTEL type for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* metrics_iterator_get_callback_t) (telemetry_metrics_iterator iterator, measurement_callback_t &callback, void *&measurement_context)
 Return metric measurement callback function for the element pointed by Telemetry Metric iterator. More...
 
typedef bool(* meters_iterator_create_t) (telemetry_meters_iterator *iterator)
 Initialize Telemetry Meter (Metric Group) iterator object to enumerate metrics groups, pointing to 1st matching metric. More...
 
typedef bool(* meters_iterator_destroy_t) (telemetry_meters_iterator iterator)
 Uninitialize Telemetry Meter (Metric Group) iterator. More...
 
typedef bool(* meters_iterator_advance_t) (telemetry_meters_iterator iterator)
 Advance Telemetry Meter (Metric Group) iterator to next element. More...
 
typedef bool(* meters_iterator_get_name_t) (telemetry_meters_iterator iterator, my_h_string *out_name_handle)
 Return meter name for the element pointed by Telemetry Meter (Metric Group) iterator. More...
 
typedef bool(* meters_iterator_get_frequency_t) (telemetry_meters_iterator iterator, unsigned int &value)
 Return meter update frequency for the element pointed by Telemetry Meter iterator. More...
 
typedef bool(* meters_iterator_get_enabled_t) (telemetry_meters_iterator iterator, bool &enabled)
 Return meter enabled status for the element pointed by Telemetry Meter iterator. More...
 
typedef bool(* meters_iterator_get_description_t) (telemetry_meters_iterator iterator, my_h_string *out_desc_handle)
 Return meter description for the element pointed by Telemetry Meter iterator. More...
 
typedef bool(* measurement_reading_start_t) ()
 Take the lock(s) needed to read system variables. More...
 
typedef bool(* measurement_reading_end_t) ()
 Release the lock(s) needed to read system variables. More...
 

Typedef Documentation

◆ measurement_reading_end_t

typedef bool(* measurement_reading_end_t) ()

Release the lock(s) needed to read system variables.

For performance reasons, lock is taken once per metric export instead of once per each variable read.

Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ measurement_reading_start_t

typedef bool(* measurement_reading_start_t) ()

Take the lock(s) needed to read system variables.

For performance reasons, lock is taken once per metric export instead of once per each variable read.

Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ meters_iterator_advance_t

typedef bool(* meters_iterator_advance_t) (telemetry_meters_iterator iterator)

Advance Telemetry Meter (Metric Group) iterator to next element.

Parameters
iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure or no more elements

◆ meters_iterator_create_t

typedef bool(* meters_iterator_create_t) (telemetry_meters_iterator *iterator)

Initialize Telemetry Meter (Metric Group) iterator object to enumerate metrics groups, pointing to 1st matching metric.

Parameters
[out]iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure

◆ meters_iterator_destroy_t

typedef bool(* meters_iterator_destroy_t) (telemetry_meters_iterator iterator)

Uninitialize Telemetry Meter (Metric Group) iterator.

Parameters
iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure

◆ meters_iterator_get_description_t

typedef bool(* meters_iterator_get_description_t) (telemetry_meters_iterator iterator, my_h_string *out_desc_handle)

Return meter description for the element pointed by Telemetry Meter iterator.

Parameters
iteratoriterator object
[out]out_desc_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ meters_iterator_get_enabled_t

typedef bool(* meters_iterator_get_enabled_t) (telemetry_meters_iterator iterator, bool &enabled)

Return meter enabled status for the element pointed by Telemetry Meter iterator.

Parameters
iteratoriterator object
[out]enabledreference to enabled result
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ meters_iterator_get_frequency_t

typedef bool(* meters_iterator_get_frequency_t) (telemetry_meters_iterator iterator, unsigned int &value)

Return meter update frequency for the element pointed by Telemetry Meter iterator.

Parameters
iteratoriterator object
[out]valuereference to result variable
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ meters_iterator_get_name_t

typedef bool(* meters_iterator_get_name_t) (telemetry_meters_iterator iterator, my_h_string *out_name_handle)

Return meter name for the element pointed by Telemetry Meter (Metric Group) iterator.

Parameters
iteratoriterator object
[out]out_name_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_advance_t

typedef bool(* metrics_iterator_advance_t) (telemetry_metrics_iterator iterator)

Advance Telemetry Metric iterator to next element.

Parameters
iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_create_t

typedef bool(* metrics_iterator_create_t) (const char *meter, telemetry_metrics_iterator *iterator)

Initialize Telemetry Metric iterator object to enumerate metrics and read measurement values, pointing to 1st matching metric.

Parameters
meterdefine meter (metric group) scope
[out]iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure

◆ metrics_iterator_destroy_t

typedef bool(* metrics_iterator_destroy_t) (telemetry_metrics_iterator iterator)

Uninitialize Telemetry Metric iterator.

Parameters
iteratoriterator object
Returns
Result of iterator creation
Return values
falseSuccess
trueFailure

◆ metrics_iterator_get_callback_t

typedef bool(* metrics_iterator_get_callback_t) (telemetry_metrics_iterator iterator, measurement_callback_t &callback, void *&measurement_context)

Return metric measurement callback function for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]callbackreference to metric callback
[out]measurement_contextreference to metric context pointer
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_description_t

typedef bool(* metrics_iterator_get_description_t) (telemetry_metrics_iterator iterator, my_h_string *out_desc_handle)

Return metric description for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]out_desc_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_group_t

typedef bool(* metrics_iterator_get_group_t) (telemetry_metrics_iterator iterator, my_h_string *out_group_handle)

Return group name for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]out_group_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_metric_type_t

typedef bool(* metrics_iterator_get_metric_type_t) (telemetry_metrics_iterator iterator, MetricOTELType &metric_type)

Return metric OTEL type for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]metric_typereference to metric type output
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_name_t

typedef bool(* metrics_iterator_get_name_t) (telemetry_metrics_iterator iterator, my_h_string *out_name_handle)

Return metric name for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]out_name_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_numeric_type_t

typedef bool(* metrics_iterator_get_numeric_type_t) (telemetry_metrics_iterator iterator, MetricNumType &numeric)

Return metric numeric type for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]numericreference to numeric type output
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_unit_t

typedef bool(* metrics_iterator_get_unit_t) (telemetry_metrics_iterator iterator, my_h_string *out_unit_handle)

Return metric unit for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
[out]out_unit_handlepointer to receive string value
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ metrics_iterator_get_value_t

typedef bool(* metrics_iterator_get_value_t) (telemetry_metrics_iterator iterator, measurement_delivery_callback_t delivery, void *delivery_context)

Return metric name for the element pointed by Telemetry Metric iterator.

Parameters
iteratoriterator object
deliverycallback to deliver measurements
delivery_contextcontext pointer, passed back to callback
Returns
Result of operation
Return values
falseSuccess
trueFailure or no more elements

◆ telemetry_meters_iterator

typedef struct telemetry_meters_iterator_imp* telemetry_meters_iterator

◆ telemetry_metrics_iterator

typedef struct telemetry_metrics_iterator_imp* telemetry_metrics_iterator