MySQL 9.1.0
Source Code Documentation
|
#include "server_logs_component.h"
#include <chrono>
#include <map>
#include "mysqld_error.h"
#include "server_logs_helpers.h"
Functions | |
REQUIRES_SERVICE_PLACEHOLDER (log_builtins) | |
REQUIRES_SERVICE_PLACEHOLDER (log_builtins_string) | |
REQUIRES_SERVICE_PLACEHOLDER_AS (mysql_server_telemetry_logs, telemetry_logs_srv) | |
REQUIRES_SERVICE_PLACEHOLDER_AS (component_sys_variable_register, sysvar_register_srv) | |
REQUIRES_SERVICE_PLACEHOLDER_AS (component_sys_variable_unregister, sysvar_unregister_srv) | |
REQUIRES_SERVICE_PLACEHOLDER_AS (udf_registration, udf_registration_srv) | |
void | dummy_log_cb (const char *logger_name, OTELLogLevel severity, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count) |
void | telemetry_log_cb (const char *logger_name, OTELLogLevel severity, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count) |
static bool | register_telemetry_callback () |
static bool | unregister_telemetry_callback () |
static int | register_system_variables () |
static void | unregister_system_variables () |
static bool | log_service_init () |
logger services initialization method for Component used when loading the Component. More... | |
static bool | log_service_deinit () |
logger services de-initialization method for Component used when unloading the Component. More... | |
static long long | test_unregister_callback (UDF_INIT *init, UDF_ARGS *args, unsigned char *null_value, unsigned char *error) |
Unregister telemetry callback, used for benchmarking comparisons. More... | |
static long long | test_invalid_operations (UDF_INIT *init, UDF_ARGS *args, unsigned char *null_value, unsigned char *error) |
Test error handling by triggering some invalid API calls. More... | |
static void | unregister_udf () |
static bool | register_udf () |
mysql_service_status_t | test_server_telemetry_logs_component_init () |
Initialize the test_server_telemetry_logs component at server start or component installation: More... | |
mysql_service_status_t | test_server_telemetry_logs_component_deinit () |
Terminate the test_server_telemetry_logs_component at server shutdown or component deinstallation: More... | |
END_COMPONENT_PROVIDES () | |
REQUIRES_SERVICE (log_builtins) | |
REQUIRES_SERVICE (log_builtins_string) | |
REQUIRES_SERVICE_AS (mysql_server_telemetry_logs, telemetry_logs_srv) | |
REQUIRES_SERVICE_AS (component_sys_variable_register, sysvar_register_srv) | |
REQUIRES_SERVICE_AS (component_sys_variable_unregister, sysvar_unregister_srv) | |
REQUIRES_SERVICE_AS (udf_registration, udf_registration_srv) | |
END_COMPONENT_REQUIRES () | |
METADATA ("mysql.author", "Oracle Corporation") | |
METADATA ("mysql.license", "GPL") | |
METADATA ("test_property", "1") | |
END_COMPONENT_METADATA () | |
Variables | |
static FileLogger | g_log ("test_server_telemetry_logs_component.log") |
static int | filter_severity_value = 9999 |
const mysql_service_log_builtins_t * | log_bi |
accessor built-ins More... | |
const mysql_service_log_builtins_string_t * | log_bs |
string built-ins More... | |
mysql_component_t | mysql_component_test_server_telemetry_logs_export |
void dummy_log_cb | ( | const char * | logger_name, |
OTELLogLevel | severity, | ||
const char * | message, | ||
time_t | timestamp, | ||
const log_attribute_t * | attr_array, | ||
size_t | attr_count | ||
) |
END_COMPONENT_METADATA | ( | ) |
END_COMPONENT_PROVIDES | ( | ) |
END_COMPONENT_REQUIRES | ( | ) |
|
static |
logger services de-initialization method for Component used when unloading the Component.
false | success |
true | failure |
|
static |
logger services initialization method for Component used when loading the Component.
false | success |
true | failure |
METADATA | ( | "mysql.author" | , |
"Oracle Corporation" | |||
) |
METADATA | ( | "mysql.license" | , |
"GPL" | |||
) |
METADATA | ( | "test_property" | , |
"1" | |||
) |
|
static |
|
static |
|
static |
REQUIRES_SERVICE | ( | log_builtins | ) |
REQUIRES_SERVICE | ( | log_builtins_string | ) |
REQUIRES_SERVICE_AS | ( | component_sys_variable_register | , |
sysvar_register_srv | |||
) |
REQUIRES_SERVICE_AS | ( | component_sys_variable_unregister | , |
sysvar_unregister_srv | |||
) |
REQUIRES_SERVICE_AS | ( | mysql_server_telemetry_logs | , |
telemetry_logs_srv | |||
) |
REQUIRES_SERVICE_AS | ( | udf_registration | , |
udf_registration_srv | |||
) |
REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins | ) |
REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins_string | ) |
REQUIRES_SERVICE_PLACEHOLDER_AS | ( | component_sys_variable_register | , |
sysvar_register_srv | |||
) |
REQUIRES_SERVICE_PLACEHOLDER_AS | ( | component_sys_variable_unregister | , |
sysvar_unregister_srv | |||
) |
REQUIRES_SERVICE_PLACEHOLDER_AS | ( | mysql_server_telemetry_logs | , |
telemetry_logs_srv | |||
) |
REQUIRES_SERVICE_PLACEHOLDER_AS | ( | udf_registration | , |
udf_registration_srv | |||
) |
void telemetry_log_cb | ( | const char * | logger_name, |
OTELLogLevel | severity, | ||
const char * | message, | ||
time_t | timestamp, | ||
const log_attribute_t * | attr_array, | ||
size_t | attr_count | ||
) |
|
static |
Test error handling by triggering some invalid API calls.
The call of this function also increases code coverage.
init | Unused. |
args | Unused. |
null_value | Unused. |
error | Unused. |
0 | This function always returns 0. |
mysql_service_status_t test_server_telemetry_logs_component_deinit | ( | ) |
Terminate the test_server_telemetry_logs_component at server shutdown or component deinstallation:
0 | success |
non-zero | failure |
mysql_service_status_t test_server_telemetry_logs_component_init | ( | ) |
Initialize the test_server_telemetry_logs component at server start or component installation:
0 | success |
non-zero | failure |
|
static |
Unregister telemetry callback, used for benchmarking comparisons.
init | Unused. |
args | Unused. |
null_value | Unused. |
error | Unused. |
0 | This function always returns 0. |
|
static |
|
static |
|
static |
|
static |
|
static |
const mysql_service_log_builtins_t* log_bi |
accessor built-ins
accessor built-ins
const mysql_service_log_builtins_string_t* log_bs |
string built-ins
mysql_component_t mysql_component_test_server_telemetry_logs_export |