MySQL 9.1.0
Source Code Documentation
pfs_telemetry_logs_client_provider.h
Go to the documentation of this file.
1/* Copyright (c) 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 PFS_TELEMETRY_LOGS_CLIENT_PROVIDER_H
25#define PFS_TELEMETRY_LOGS_CLIENT_PROVIDER_H
26
27/**
28 @file include/pfs_telemetry_logs_client_provider.h
29 Performance schema instrumentation (declarations).
30*/
31
33#include <sys/types.h>
34
35/* HAVE_PSI_*_INTERFACE */
36#include "my_psi_config.h" // IWYU pragma: keep
37
38#ifdef HAVE_PSI_SERVER_TELEMETRY_LOGS_INTERFACE
39#if defined(MYSQL_SERVER) || defined(PFS_DIRECT_CALL)
40#ifndef MYSQL_DYNAMIC_PLUGIN
41
42#include "my_inttypes.h"
43#include "my_macros.h"
44
45#define PSI_LOGS_CLIENT_CALL(M) pfs_##M##_v1
46
48 const char *category);
51void pfs_log_emit_v1(PSI_logger *logger, OTELLogLevel level,
52 const char *message, time_t timestamp,
53 const log_attribute_t *attr_array, size_t attr_count);
54
55#endif /* MYSQL_DYNAMIC_PLUGIN */
56#endif /* MYSQL_SERVER || PFS_DIRECT_CALL */
57#endif /* HAVE_PSI_SERVER_TELEMETRY_LOGS_INTERFACE */
58
59#endif
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
static int count
Definition: myisam_ftdump.cc:45
constexpr value_type timestamp
Definition: classic_protocol_constants.h:278
static const char * category
Definition: sha2_password.cc:170
static Logger logger
The "top-level" logger used when no connection context is given.
Definition: test_trace_plugin.cc:296
void pfs_log_emit_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_client_service_imp.cc:216
void pfs_register_logger_client_v1(PSI_logger_info_v1 *info, size_t count, const char *category)
Definition: mysql_server_telemetry_logs_client_service_imp.cc:152
PSI_logger * pfs_check_enabled_v1(PSI_logger_key key, OTELLogLevel level)
Definition: mysql_server_telemetry_logs_client_service_imp.cc:203
void pfs_unregister_logger_client_v1(PSI_logger_info_v1 *info, size_t count)
Definition: mysql_server_telemetry_logs_client_service_imp.cc:194
required string key
Definition: replication_asynchronous_connection_failover.proto:60
OTELLogLevel
Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity...
Definition: server_telemetry_logs_client_bits.h:43
unsigned int PSI_logger_key
Definition: server_telemetry_logs_client_bits.h:45
Defines a logger from the side of instrumented code (log API client).
Definition: server_telemetry_logs_client_bits.h:57
Definition: server_telemetry_attribute_bits.h:57