SDK/Trace/Sampler/Result.pm

filter: Statementstmt 93.1% 27 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 3 / 3 totaltotal 92.3% 36 / 39 CC 1 SCAR 0.4
CC
1
Cov
93%
trace_state
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SDK/Logs/LogRecord.pm ↑ Summary SDK/Logs/LogRecord/Processor/Simple.pm »
1 5 ▶use Object::Pad ':experimental(init_expr)';
Subroutine BEGIN: called CC=1 SCAR=0.0
2 # ABSTRACT: The result of a sampling decision
3  
4 package OpenTelemetry::SDK::Trace::Sampler::Result;
5  
6 5 our $VERSION = '0.101';
7  
8 5 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 DROP => 0,
10 RECORD_ONLY => 1,
11 RECORD_AND_SAMPLE => 2,
12 5 };
13  
14 1 ▶class OpenTelemetry::SDK::Trace::Sampler::Result :does(OpenTelemetry::Attributes) {
Subroutine BEGIN: called CC=1 SCAR=0.0
15 0 ▶ field $trace_state :param :reader;
Subroutine trace_state: not called CC=1 SCAR=2.6
Pod documented
16 5 field $decision :param;
17  
18 ADJUST {
19 5 ▶ no warnings qw( uninitialized numeric );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 $decision = DROP
21 unless $decision >= RECORD_ONLY
22 && $decision <= RECORD_AND_SAMPLE;
23 }
24  
25 1 ▶ method sampled () { $decision eq RECORD_AND_SAMPLE }
Subroutine sampled: called CC=1 SCAR=0.0
Pod documented
26  
27 1 ▶ method recording () { $decision ne DROP }
Subroutine recording: called CC=1 SCAR=0.0
Pod documented
28 5 }
« SDK/Logs/LogRecord.pm ↑ Summary SDK/Logs/LogRecord/Processor/Simple.pm »