| 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 | } | |