| 1 | package OpenTracing::Interface::Tracer; | ||
| 2 | |||
| 3 | |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | 3 | our $VERSION = 'v0.206.0'; | |
| 9 | |||
| 10 | |||
| 11 | 3 | ▶ | use Role::Declare::Should; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 3 | ▶ | use OpenTracing::Types qw/ContextReference Scope ScopeManager Span SpanContext/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 3 | ▶ | use Types::Standard qw/ArrayRef Bool Dict HashRef Maybe Object Str/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 3 | ▶ | use Types::Common::Numeric qw/PositiveOrZeroNum/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | 3 | ▶ | use constant Carrier => Object | HashRef | ArrayRef; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 3 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 3 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | instance_method get_scope_manager( | ||
| 26 | 3 | ▶ | ) :Return(ScopeManager) {} |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | instance_method get_active_span( | ||
| 31 | 3 | ▶ | ) :ReturnMaybe(Span) {} |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | instance_method start_active_span( | ||
| 36 | Str $operation_name, | ||
| 37 | Maybe[ Span | SpanContext ] :$child_of, | ||
| 38 | Maybe[ ArrayRef[ContextReference] ] :$references, | ||
| 39 | Maybe[ HashRef[Str] ] :$tags, | ||
| 40 | Maybe[ PositiveOrZeroNum ] :$start_time, | ||
| 41 | Maybe[ Bool ] :$ignore_active_span, | ||
| 42 | Maybe[ Bool ] :$finish_span_on_close, | ||
| 43 | ) :Return(Scope) { | ||
| 44 | croak "'child_of' and 'references' are mutual exclusive options" | ||
| 45 | if defined $child_of && defined $references; | ||
| 46 | 3 | ▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | instance_method start_span( | ||
| 51 | Str $operation_name, | ||
| 52 | Maybe[ Span | SpanContext ] :$child_of, | ||
| 53 | Maybe[ ArrayRef[ContextReference] ] :$references, | ||
| 54 | Maybe[ HashRef[Str] ] :$tags, | ||
| 55 | Maybe[ PositiveOrZeroNum ] :$start_time, | ||
| 56 | Maybe[ Bool ] :$ignore_active_span, | ||
| 57 | ) :Return(Span) { | ||
| 58 | croak "'child_of' and 'references' are mutual exclusive options" | ||
| 59 | if defined $child_of && defined $references; | ||
| 60 | 3 | ▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | instance_method inject_context( | ||
| 65 | Carrier $carrier, | ||
| 66 | Maybe[ SpanContext ] $span_context = undef, | ||
| 67 | 3 | ▶ | ) :Return(Carrier) {} # a clone preferably |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | instance_method extract_context( | ||
| 72 | Carrier $carrier, | ||
| 73 | 3 | ▶ | ) :ReturnMaybe(SpanContext) {} |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | 3 | 1; | |