CGI-Application-Plugin-OpenTracing-DataDog
view release on metacpan or search on metacpan
t/90_component.t view on Meta::CPAN
my $mech = Test::WWW::Mechanize::CGIApp->new;
$mech->app( 'MyTest::CGI::Application::Fake' );
$mech->get_ok('/test.cgi');
};
subtest 'Check HTTP UserAgent' => sub {
my @requests = $fake_user_agent->get_all_requests();
my @structs = map {
decode_json( $_->decoded_content )
} @requests;
my $span_data = $structs[-1];
cmp_deeply(
$span_data => [[
superhashof {
'meta' => {
'component' => "CGI::Application",
'http.method' => "GET",
'http.status_code' => 200,
'http.url' => "http://localhost/test.cgi",
( run in 0.231 second using v1.01-cache-2.11-cpan-26ccb49234f )