MySQL 9.1.0
Source Code Documentation
Example component

Component/plugin that implements telemetry tracing, typically also uses other services within the callbacks to inspect and filter out the traced statements according to its needs.

For example, you can skip tracing statements based on client user name, host or IP, schema name, query (digest) text and similar. As an example, see "components/test_server_telemetry_traces" test component source code, used to test this service.