SDK/Trace/Sampler/Result.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 3 / 3 totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SDK/Trace/Sampler/AlwaysOn.pm ↑ Summary SDK/Trace/SpanLimits.pm »
1 9 ▶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 9 our $VERSION = '0.100';
7  
8 9 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 DROP => 0,
10 RECORD_ONLY => 1,
11 RECORD_AND_SAMPLE => 2,
12 9 };
13  
14 5 ▶class OpenTelemetry::SDK::Trace::Sampler::Result :does(OpenTelemetry::Attributes) {
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ field $trace_state :param :reader;
Subroutine trace_state: called CC=1 SCAR=0.0
Pod documented
16 9 field $decision :param;
17  
18 ADJUST {
19 9 ▶ 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 5 ▶ method sampled () { $decision eq RECORD_AND_SAMPLE }
Subroutine sampled: called CC=1 SCAR=0.0
Pod documented
26  
27 61 ▶ method recording () { $decision ne DROP }
Subroutine recording: called CC=1 SCAR=0.0
Pod documented
28 9 }
« SDK/Trace/Sampler/AlwaysOn.pm ↑ Summary SDK/Trace/SpanLimits.pm »