The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OpenTracing::Role::ScopeManager - Role for OpenTracing implementations.

SYNOPSIS

    package OpenTracing::Implementation::MyBackendService::ScopeManager;
    
    use Moo;
    
    with 'OpenTracing::Role::ScopeManager'
    
    1;

DESCRIPTION

This is a role for OpenTracing implenetations that are compliant with the OpenTracing::Interface.

REQUIRED METHODS

build_scope

This method should return a Scope

Expected Named Parameters

span

A OpenTracing compliant Span object.

finish_span_on_close

A Bool type.

Note

Unlike the OpenTracing API interface specification, build_scope does not let it up for discusion, span and finish_span_on_close are expected named parameters.

INSTANCE METHODS

activate_span

Sets the given $span as being the active span in a newly created Scope.

Required Positional Parameter

$span

A OpenTracing compliant Span object.

Optional Named Parameter

finish_span_on_close

A Bool type, that decides wether or not finish gets called on the $span object. Defaults to 'true'.

Note

This is part of a proposed API change.