Skip to content

AAllport/psr-tracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PSR Tracing

This repository holds all interfaces/classes/traits related to PSR-22.

Note that this is not a logger of its own. It is merely an interface that describes a tracer. See the specification for more details.

More information

Installation

composer require psr/tracing

Usage

function imgResize($size=100) {
    $span = $this->tracer->startSpan('image.resize')
        ->setAttribute('size',$size)
        ->activate();    

    try{
    
      //Resize the image
      return $resizedImage;
    
    } catch (Exception $e) {
        // Ideally, you would attach the exception to the span here
        $span->setStatus(SpanInterface::STATUS_ERROR)
             ->addException($e);
    } finally {
        $span->finish();
    }    
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages