| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
181957
|
use Object::Pad ':experimental(init_expr)'; |
|
|
1
|
|
|
|
|
14083
|
|
|
|
1
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: The status of an OpenTelemetry span |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package OpenTelemetry::Trace::Span::Status; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.033'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
class OpenTelemetry::Trace::Span::Status { |
|
9
|
1
|
|
|
1
|
|
878
|
use OpenTelemetry::Common (); |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
119
|
|
|
10
|
|
|
|
|
|
|
use OpenTelemetry::Constants |
|
11
|
1
|
|
|
1
|
|
7
|
-span_status => { -as => sub { shift =~ s/^SPAN_STATUS_//r } }; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
696
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $logger = OpenTelemetry::Common::internal_logger; |
|
14
|
|
|
|
|
|
|
|
|
15
|
7
|
|
|
7
|
0
|
2137
|
field $code :param :reader = UNSET; |
|
16
|
7
|
|
|
|
|
26
|
field $description :param :reader = undef; |
|
17
|
|
|
|
|
|
|
|
|
18
|
7
|
|
|
7
|
0
|
17617
|
ADJUST { |
|
|
7
|
|
|
|
|
31
|
|
|
19
|
|
|
|
|
|
|
$code = UNSET if $code && $code < UNSET || $code > ERROR; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if ( $code != ERROR && $description ) { |
|
22
|
|
|
|
|
|
|
undef $description; |
|
23
|
|
|
|
|
|
|
$logger->warn('Ignoring description on a non-error span status'); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$description //= ''; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
2
|
|
|
2
|
1
|
367
|
sub ok ( $class, %args ) { $class->new( %args, code => OK ) } |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
24
|
|
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
22
|
|
|
30
|
2
|
|
|
2
|
1
|
397
|
sub error ( $class, %args ) { $class->new( %args, code => ERROR ) } |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
22
|
|
|
31
|
2
|
|
|
2
|
1
|
644
|
sub unset ( $class, %args ) { $class->new( %args, code => UNSET ) } |
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
32
|
|
|
|
2
|
|
|
|
|
27
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
4
|
|
|
4
|
1
|
887
|
method is_ok () { $code == OK } |
|
|
4
|
|
|
|
|
17
|
|
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
12
|
|
|
34
|
4
|
|
|
4
|
0
|
835
|
method is_error () { $code == ERROR } |
|
|
4
|
|
|
|
|
15
|
|
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
13
|
|
|
35
|
4
|
|
|
4
|
0
|
835
|
method is_unset () { $code == UNSET } |
|
|
4
|
|
|
|
|
17
|
|
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
14
|
|
|
36
|
|
|
|
|
|
|
} |