File Coverage

blib/lib/Sentry/Integration.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 38 39 97.4


line stmt bran cond sub pod time code
1             use Mojo::Base -base, -signatures;
2 4     4   23  
  4         7  
  4         25  
3             use Sentry::Hub;
4 4     4   1520 use Sentry::Hub::Scope;
  4         10  
  4         25  
5 4     4   114 use Sentry::Integration::DBI;
  4         15  
  4         18  
6 4     4   1570 use Sentry::Integration::DieHandler;
  4         9  
  4         31  
7 4     4   1510 use Sentry::Integration::MojoUserAgent;
  4         9  
  4         34  
8 4     4   1498 use Sentry::Integration::LwpUserAgent;
  4         9  
  4         26  
9 4     4   1509  
  4         10  
  4         26  
10             my @Global_integrations = (
11             Sentry::Integration::DieHandler->new,
12             Sentry::Integration::DBI->new,
13             Sentry::Integration::MojoUserAgent->new,
14             Sentry::Integration::LwpUserAgent->new,
15             );
16              
17             my @all_integrations = (@Global_integrations, $custom_integrations->@*);
18 17     17 0 172 foreach my $integration (grep { !$_->initialized } @all_integrations) {
  17         25  
  17         24  
  17         20  
19 17         39 $integration->setup_once(
20 17         29 Sentry::Hub::Scope->can('add_global_event_processor'),
  68         303  
21 12         157 Sentry::Hub->can('get_current_hub'));
22              
23             $integration->initialized(1);
24             }
25 12         40 }
26              
27             1;