OpenTracing::DSL - application tracing
use OpenTracing::DSL qw(:v1); trace { my ($span) = @_; print 'operation starts here'; $span->add_tag(internal_details => '...'); sleep 2; print 'end of operation'; };
Takes a block of code and provides it with an OpenTracing::SpanProxy.
trace { my ($span) = @_; $span->tag( 'extra.details' => '...' ); } operation_name => 'your_code';
Returns whatever your code did.
If the block of code throws an exception, that'll cause the span to be marked as an error.
Tom Molesworth <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.