NAME
OpenTracing::DSL - application tracing
SYNOPSIS
use OpenTracing::DSL qw(:v1);
trace {
my ($span) = @_;
print 'operation starts here';
$span->add_tag(internal_details => '...');
sleep 2;
print 'end of operation';
};
trace
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.
AUTHOR
Tom Molesworth <TEAM@cpan.org>
LICENSE
Copyright Tom Molesworth 2018-2021. Licensed under the same terms as Perl itself.