File Coverage

blib/lib/Sentry/Envelope.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             use Mojo::Base -base, -signatures;
2 4     4   25  
  4         10  
  4         27  
3             use Mojo::JSON qw(encode_json);
4 4     4   1122  
  4         10  
  4         1328  
5             has event_id => undef;
6             has headers => sub ($self) { { event_id => $self->event_id } };
7             has body => sub { {} };
8             has sample_rates => sub { [{ id => "client_rate", rate => "1" }] }; # FIXME
9             has type => 'transaction';
10             has item_headers =>
11             sub ($self) { { type => $self->type, sample_rates => $self->sample_rates } };
12              
13             my @lines = ($self->headers, $self->item_headers, $self->body);
14 8     8 0 15 return join("\n", map { encode_json($_) } @lines);
  8         10  
  8         11  
15 8         24 }
16 8         78  
  24         1231  
17             1;