MySQL 9.1.0
Source Code Documentation
server_telemetry_logs_client_bits.h File Reference
#include <time.h>
#include <cstddef>
#include <cstdint>
#include "server_telemetry_attribute_bits.h"

Go to the source code of this file.

Classes

struct  PSI_logger_info_v1
 Defines a logger from the side of instrumented code (log API client). More...
 

Macros

#define PSI_LOGGER_CLIENT_VERSION_1   1
 Performance Schema Logger Client Interface number for version 1. More...
 
#define PSI_CURRENT_LOGGER_CLIENT_VERSION   1
 Performance Schema Logger Client Interface number for the most recent version. More...
 

Typedefs

typedef unsigned int PSI_logger_key
 
typedef void(* register_telemetry_logger_client_v1_t) (PSI_logger_info_v1 *info, size_t count, const char *category)
 Register telemetry logger client. More...
 
typedef void(* unregister_telemetry_logger_client_v1_t) (PSI_logger_info_v1 *info, size_t count)
 Unregister telemetry logger client. More...
 
typedef PSI_logger *(* check_enabled_telemetry_logger_client_v1_t) (PSI_logger_key key, OTELLogLevel level)
 Check if the logger/log_level combination is currently enabled. More...
 
typedef void(* log_emit_telemetry_logger_client_v1_t) (PSI_logger *logger, OTELLogLevel level, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count)
 Emit telemetry log record. More...
 

Enumerations

enum  OTELLogLevel {
  TLOG_NONE , TLOG_ERROR , TLOG_WARN , TLOG_INFO ,
  TLOG_DEBUG
}
 Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity.h Some OTEL documentation pages also mention "fatal" level, but there is no support for it in the opentelemetry-cpp yet. More...
 

Variables

constexpr size_t MAX_LOGGER_NAME_LEN = 63
 
constexpr size_t MAX_LOG_ATTRIBUTES = 64
 

Macro Definition Documentation

◆ PSI_CURRENT_LOGGER_CLIENT_VERSION

#define PSI_CURRENT_LOGGER_CLIENT_VERSION   1

Performance Schema Logger Client Interface number for the most recent version.

The most current version is PSI_METRIC_VERSION_1

◆ PSI_LOGGER_CLIENT_VERSION_1

#define PSI_LOGGER_CLIENT_VERSION_1   1

Performance Schema Logger Client Interface number for version 1.

This version is supported.

Typedef Documentation

◆ check_enabled_telemetry_logger_client_v1_t

typedef PSI_logger *(* check_enabled_telemetry_logger_client_v1_t) (PSI_logger_key key, OTELLogLevel level)

Check if the logger/log_level combination is currently enabled.

Parameters
keyregistered logger key
levellog level to be checked
Return values
loggerpointer, NULL on failure

◆ log_emit_telemetry_logger_client_v1_t

typedef void(* log_emit_telemetry_logger_client_v1_t) (PSI_logger *logger, OTELLogLevel level, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count)

Emit telemetry log record.

Parameters
loggerlogger object
levellog level
messagemessage string to be logged
timestamplog timestamp
attr_arraylist of log record attributes (NULL for no attributes)
attr_countsize of attributes array (0 for no attributes)

◆ PSI_logger_key

typedef unsigned int PSI_logger_key

◆ register_telemetry_logger_client_v1_t

typedef void(* register_telemetry_logger_client_v1_t) (PSI_logger_info_v1 *info, size_t count, const char *category)

Register telemetry logger client.

Parameters
infoarray of logger definitions
countnumber of loggers in an array
categorycommon category name for set of loggers

◆ unregister_telemetry_logger_client_v1_t

typedef void(* unregister_telemetry_logger_client_v1_t) (PSI_logger_info_v1 *info, size_t count)

Unregister telemetry logger client.

Parameters
infoarray of logger definitions
countarray size

Enumeration Type Documentation

◆ OTELLogLevel

Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity.h Some OTEL documentation pages also mention "fatal" level, but there is no support for it in the opentelemetry-cpp yet.

Note that enum integer values may not match those of OTEL.

Enumerator
TLOG_NONE 
TLOG_ERROR 
TLOG_WARN 
TLOG_INFO 
TLOG_DEBUG 

Variable Documentation

◆ MAX_LOG_ATTRIBUTES

constexpr size_t MAX_LOG_ATTRIBUTES = 64
constexpr

◆ MAX_LOGGER_NAME_LEN

constexpr size_t MAX_LOGGER_NAME_LEN = 63
constexpr