OpenTracing::Integration - top-level class for integrating OpenTracing with other Perl modules
# Apply tracing for specific modules use OpenTracing::Integration qw(HTTP::Tiny DBI); # Trace every module we know about use OpenTracing::Integration qw(:all);
This is the base rôle for handling tracing integration with other CPAN modules.
It provides functionality for loading available integrations via the import list on a use statement:
use
with :all, any module that supports OpenTracing will be pulled in, if the module-to-be-traced is already loaded
:all
with a specific list of modules, these will be applied unconditionally, loading the modules-to-be-traced as required
This means that you can expect HTTP::Tiny to be traced if you do this:
use OpenTracing::Integration qw(HTTP::Tiny);
or this:
use HTTP::Tiny; use OpenTracing::Integration qw(:all);
but it will not be traced if you do this:
use OpenTracing::Integration qw(:all); use HTTP::Tiny;
The reason for this inconsistent behaviour is simple: with a large install, :all might pull in a lot of unwanted modules. Instead, you'd do this at the end of your module imports, and any functionality that you're actively using in the code would gain tracing, if available.
Tom Molesworth TEAM@cpan.org
TEAM@cpan.org
Copyright Tom Molesworth 2018-2020. Licensed under the same terms as Perl itself.
To install OpenTracing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenTracing
CPAN shell
perl -MCPAN -e shell install OpenTracing
For more information on module installation, please visit the detailed CPAN module installation guide.