18.08.2025 11:31, Artyom Abakumov:
> Hello. I have a custom trace plugin to calculate some statistics. It works well until the client wants to use both my plugin and
> internal 'fbtrace' plugins. The same config file from AuditTraceConfigFile comes to the both plugins so config of my plugin should
> be compatible with the fbtrace (and no exstantable). This can be avoided by explicitly loading different configurations, but without
> a AuditTraceConfigFile value, there will be no trace session, and no plugin will be run. So the outcomes:
>
> 1. When using only my plugin: set my configuration in AuditTraceConfigFile.
> 2. When using both fbtrace and my plugin: set AuditTraceConfigFile = fbtrace.conf and load my configuration from a different place
>
> Another issue is version control. It is necessary to wait for a DBMS restart since it is impossible to update the plugin on the fly.
> Additionally, the interface does not provide any getVersion functions.
>
> Maybe it is possible to implement some improvements to the design:
>
> 1) Introduce a new interface function getVersion and a corresponding service action print_version (this seems relatively
> straightforward to implement).
Version of what ? For what ?
> 2) Add the ability to reload plugins on the fly. (From what I can see, this could be implemented in TraceManager::update_sessions(),
> before realoding the sessions and then update plugin for each session)
Trace Manager **is not** a Plugin Manager, don't ask it to do others job.
Also, PluginManager already unloads plugins after 60 sec of last use.
> 3) Move TracePlugin and AuditTraceConfigFile to plugins.conf (in FB6 or FB7). This would allow specifying configuration file for
> each plugin (or no configuration if a plugin does not require it).
Both settings belongs to the engine, so - no, this is wrong.
BTW, did you try to specify list of plugins for TracePlugin value ?
> 4) Allow to sepcify trace plugin in tracemgr
fbtracemgr is command-line interface for the Trace API. You can add any kind of command
in it, but it makes no sense without support at engine side. I.e. we need implement a way
of how to specify desired trace plugin(s) for the trace session. It also should address a
task of specifying custom configuration for custom plugin.
> What do you think of these suggestions? You misunderstand concept of server audit: it must be non-interruptible and controlled by
privileged person only (DBA in our case). Therefore it is intentional not possible to replace
audit configuration without a full stop of the server. You may agree or not, but this was
original idea of audit session.
What you want is non-interactive trace session like audit but without such strong requirements.
Initially, it was intended to run separate instance of fbtracemgr for it, btw, therefore there is
no support in the engine for such kind of sessions. Of course it can be implemented. With no need
to screw up audit session.
Regards,
Vlad