MySQL 9.1.0
Source Code Documentation

C++ wrapper for emitting a telemetry log record. More...

#include <mysql_telemetry_logs_client.h>

Public Member Functions

 PSI_LogRecord (PSI_logger_key key, OTELLogLevel level, const char *message)
 
bool check_enabled () const
 
void add_attribute_bool (const char *name, bool value)
 
void add_attribute_string (const char *name, const char *value)
 
void add_attribute_string_view (const char *name, const char *value, size_t len)
 
void add_attribute_double (const char *name, double value)
 
void add_attribute_uint64 (const char *name, uint64_t value)
 
void emit ()
 

Protected Attributes

PSI_logger * m_psi {nullptr}
 
PSI_logger_key m_logger_key
 
OTELLogLevel m_level
 
const char * m_message
 
log_attribute_t m_attrs [MAX_LOG_ATTRIBUTES]
 
size_t m_attr_count {0}
 

Detailed Description

C++ wrapper for emitting a telemetry log record.

Constructor & Destructor Documentation

◆ PSI_LogRecord()

PSI_LogRecord::PSI_LogRecord ( PSI_logger_key  key,
OTELLogLevel  level,
const char *  message 
)
inline

Member Function Documentation

◆ add_attribute_bool()

void PSI_LogRecord::add_attribute_bool ( const char *  name,
bool  value 
)
inline

◆ add_attribute_double()

void PSI_LogRecord::add_attribute_double ( const char *  name,
double  value 
)
inline

◆ add_attribute_string()

void PSI_LogRecord::add_attribute_string ( const char *  name,
const char *  value 
)
inline

◆ add_attribute_string_view()

void PSI_LogRecord::add_attribute_string_view ( const char *  name,
const char *  value,
size_t  len 
)
inline

◆ add_attribute_uint64()

void PSI_LogRecord::add_attribute_uint64 ( const char *  name,
uint64_t  value 
)
inline

◆ check_enabled()

bool PSI_LogRecord::check_enabled ( ) const
inline

◆ emit()

void PSI_LogRecord::emit ( )
inline

Member Data Documentation

◆ m_attr_count

size_t PSI_LogRecord::m_attr_count {0}
protected

◆ m_attrs

log_attribute_t PSI_LogRecord::m_attrs[MAX_LOG_ATTRIBUTES]
protected

◆ m_level

OTELLogLevel PSI_LogRecord::m_level
protected

◆ m_logger_key

PSI_logger_key PSI_LogRecord::m_logger_key
protected

◆ m_message

const char* PSI_LogRecord::m_message
protected

◆ m_psi

PSI_logger* PSI_LogRecord::m_psi {nullptr}
protected

The documentation for this class was generated from the following file: