| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
2
|
|
|
2
|
|
251641
|
use Object::Pad ':experimental(init_expr)'; |
|
|
2
|
|
|
|
|
16195
|
|
|
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: A basic OpenTelemetry span processor |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package OpenTelemetry::SDK::Trace::Span::Processor::Simple; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.028'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
class OpenTelemetry::SDK::Trace::Span::Processor::Simple |
|
9
|
|
|
|
|
|
|
:does(OpenTelemetry::Trace::Span::Processor) |
|
10
|
2
|
|
|
2
|
|
1867
|
{ |
|
|
2
|
|
|
|
|
4164
|
|
|
|
2
|
|
|
|
|
273
|
|
|
11
|
2
|
|
|
2
|
|
759
|
use Feature::Compat::Try; |
|
|
2
|
|
|
|
|
548
|
|
|
|
2
|
|
|
|
|
17
|
|
|
12
|
2
|
|
|
2
|
|
800
|
use Future::AsyncAwait; |
|
|
2
|
|
|
|
|
27784
|
|
|
|
2
|
|
|
|
|
19
|
|
|
13
|
2
|
|
|
2
|
|
682
|
use OpenTelemetry::X; |
|
|
2
|
|
|
|
|
9416
|
|
|
|
2
|
|
|
|
|
86
|
|
|
14
|
2
|
|
|
2
|
|
576
|
use OpenTelemetry; |
|
|
2
|
|
|
|
|
158284
|
|
|
|
2
|
|
|
|
|
45
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
field $exporter :param; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
ADJUST { |
|
19
|
|
|
|
|
|
|
die OpenTelemetry::X->create( |
|
20
|
|
|
|
|
|
|
Invalid => "Exporter must implement the OpenTelemetry::Exporter interface: " . ( ref $exporter || $exporter ) |
|
21
|
|
|
|
|
|
|
) unless $exporter && $exporter->DOES('OpenTelemetry::Exporter'); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
1
|
1497
|
method process ( @items ) { |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
2
|
|
|
25
|
1
|
|
|
|
|
8
|
$exporter->export(\@items); |
|
26
|
1
|
|
|
|
|
18
|
return; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
1
|
4839
|
method on_start ( $span, $context ) { } |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
2
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
1
|
10143
|
method on_end ($span) { |
|
|
3
|
|
|
|
|
17
|
|
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
7
|
|
|
32
|
3
|
|
|
|
|
9
|
try { |
|
33
|
3
|
100
|
|
|
|
22
|
return unless $span->context->trace_flags->sampled; |
|
34
|
1
|
|
|
|
|
2332
|
$self->process( $span->snapshot ); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
catch ($e) { |
|
37
|
1
|
|
|
|
|
29
|
OpenTelemetry->handle_error( |
|
38
|
|
|
|
|
|
|
exception => $e, |
|
39
|
|
|
|
|
|
|
message => 'unexpected error in ' . ref($self) . '->on_end', |
|
40
|
|
|
|
|
|
|
); |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
2
|
|
|
2
|
1
|
917
|
async method shutdown ( $timeout = undef ) { |
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
30
|
|
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
4
|
|
|
45
|
2
|
|
|
|
|
17
|
await $exporter->shutdown( $timeout ); |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
2
|
|
|
2
|
1
|
908
|
async method force_flush ( $timeout = undef ) { |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
10
|
|
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
4
|
|
|
49
|
2
|
|
|
|
|
11
|
await $exporter->force_flush( $timeout ); |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
} |