MySQL 9.1.0
Source Code Documentation
mysql_server_telemetry_logs_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_SERVER_TELEMETRY_LOGS_SERVICE_IMP_H
25#define MYSQL_SERVER_TELEMETRY_LOGS_SERVICE_IMP_H
26
28#include <mysql/plugin.h>
29
30/**
31 @file storage/perfschema/mysql_server_telemetry_logs_service_imp.h
32 The performance schema implementation of server telemetry logs service.
33*/
34extern SERVICE_TYPE(mysql_server_telemetry_logs)
35 SERVICE_IMPLEMENTATION(performance_schema, mysql_server_telemetry_logs);
36
39
42void pfs_notify_logger_v1(PSI_logger *logger, OTELLogLevel level,
43 const char *message, time_t timestamp,
44 const log_attribute_t *attr_array, size_t attr_count);
45
47#ifdef HAVE_PSI_SERVER_TELEMETRY_LOGS_INTERFACE
48extern std::atomic<log_delivery_callback_t> g_telemetry_log;
49#endif /* HAVE_PSI_SERVER_TELEMETRY_LOGS_INTERFACE */
50
51#endif /* MYSQL_SERVER_TELEMETRY_LOGS_SERVICE_IMP_H */
void pfs_notify_logger_v1(PSI_logger *logger, OTELLogLevel level, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count)
Definition: mysql_server_telemetry_logs_service_imp.cc:199
mysql_mutex_t LOCK_pfs_logging_callback
Definition: mysql_server_telemetry_logs_service_imp.cc:119
std::atomic< log_delivery_callback_t > g_telemetry_log
Definition: mysql_server_telemetry_logs_service_imp.cc:116
bool pfs_register_logger_v1(log_delivery_callback_t logger)
Definition: mysql_server_telemetry_logs_service_imp.cc:152
void initialize_mysql_server_telemetry_logs_service()
Definition: mysql_server_telemetry_logs_service_imp.cc:128
const mysql_service_mysql_server_telemetry_logs_t SERVICE_IMPLEMENTATION(performance_schema, mysql_server_telemetry_logs)
void cleanup_mysql_server_telemetry_logs_service()
Definition: mysql_server_telemetry_logs_service_imp.cc:142
bool pfs_unregister_logger_v1(log_delivery_callback_t logger)
Definition: mysql_server_telemetry_logs_service_imp.cc:176
constexpr value_type timestamp
Definition: classic_protocol_constants.h:278
static Logger logger
The "top-level" logger used when no connection context is given.
Definition: test_trace_plugin.cc:296
void(* log_delivery_callback_t)(const char *logger_name, OTELLogLevel severity, const char *message, time_t timestamp, const log_attribute_t *attr_array, size_t attr_count)
Definition: server_telemetry_logs_bits.h:33
OTELLogLevel
Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity...
Definition: server_telemetry_logs_client_bits.h:43
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Definition: server_telemetry_attribute_bits.h:57
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50