CGI-Application-Plugin-OpenTracing
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
203204205206207208209210211212213214215216217218219220221222223
$plugin
->add_tags(TRC_ACTIVE_SCOPE,
error
=> 1,
message
=>
$error
,
grep_error_tags(
$plugin
->get_tags(TRC_ACTIVE_SCOPE) ),
);
# run span should continue
my
$root
=
$plugin
->get_scope(CGI_RUN)->get_span;
my
$tracer
=
$plugin
->get_tracer();
_cascade_set_failed_spans(
$tracer
,
$error
,
$root
);
return
;
}
################################################################################
#
# Plugin methods - These do not require the CGI-App
#
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
328329330331332333334335336337338339340341342343344345346347348
@implementation_import_opts
,
@bootstrap_options
,
)
;
return
$bootstrapped_tracer
;
}
sub
_cascade_set_failed_spans {
my
(
$tracer
,
$error
,
$root_span
) =
@_
;
my
$root_addr
= refaddr(
$root_span
)
if
defined
$root_span
;
while
(
my
$scope
=
$tracer
->get_scope_manager->get_active_scope()) {
my
$span
=
$scope
->get_span();
last
if
defined
$root_addr
and
$root_addr
eq refaddr(
$span
);
# $span->add_tags(error => 1, message => $error);
$scope
->
close
();
}
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
720721722723724725726727728729730731732733734735736737738
message
=>
$error
,
);
$plugin
->add_tags(TRC_ACTIVE_SCOPE,
error
=> 1,
message
=>
$error
,
grep_error_tags(
$plugin
->get_tags(TRC_ACTIVE_SCOPE) ),
);
my
$tracer
=
$plugin
->get_tracer();
_cascade_set_failed_spans(
$tracer
,
$error
);
die
$error
;
};
}
1;
( run in 0.340 second using v1.01-cache-2.11-cpan-95122f20152 )