public function timeEventAdded(Span $span, TimeEvent $timeEvent)
    {
        if ($span->attached()) {
            if ($timeEvent instanceof Annotation) {
                $this->addAnnotation($timeEvent->description(), [
                    'time' => $timeEvent->time(),
                    'attributes' => $timeEvent->attributes(),
                    'span' => $span
                ]);
            } elseif ($timeEvent instanceof MessageEvent) {
                $this->addMessageEvent($timeEvent->type(), $timeEvent->id(), [
                    'time' => $timeEvent->time(),
                    'uncompressedSize' => $timeEvent->uncompressedSize(),
                    'compressedSize' => $timeEvent->compressedSize(),
                    'span' => $span
                ]);
            }
        }
    }
public function timeEventAdded(Span $span, TimeEvent $timeEvent)
    {
        if ($span->attached()) {
            if ($timeEvent instanceof Annotation) {
                $this->addAnnotation($timeEvent->description(), [
                    'time' => $timeEvent->time(),
                    'attributes' => $timeEvent->attributes(),
                    'span' => $span
                ]);
            } elseif ($timeEvent instanceof MessageEvent) {
                $this->addMessageEvent($timeEvent->type(), $timeEvent->id(), [
                    'time' => $timeEvent->time(),
                    'uncompressedSize' => $timeEvent->uncompressedSize(),
                    'compressedSize' => $timeEvent->compressedSize(),
                    'span' => $span
                ]);
            }
        }
    }
public function timeEventAdded ( Span $ span , TimeEvent $ timeEvent ) { if ( $ span -> attached ( ) ) { if ( $ timeEvent instanceof Annotation ) { $ this -> addAnnotation ( $ timeEvent -> description ( ) , [ 'time' => $ timeEvent -> time ( ) , 'attributes' => $ timeEvent -> attributes ( ) , 'span' => $ span ] ) ; } elseif ( $ timeEvent instanceof MessageEvent ) { $ this -> addMessageEvent ( $ timeEvent -> type ( ) , $ timeEvent -> id ( ) , [ 'time' => $ timeEvent -> time ( ) , 'uncompressedSize' => $ timeEvent -> uncompressedSize ( ) , 'compressedSize' => $ timeEvent -> compressedSize ( ) , 'span' => $ span ] ) ; } } }
Triggers when a time event is added to a span.

@param Span $span The span the time event was added to
@param TimeEvent $timeEvent The time event added to the span
Triggers when a time event is added to a span .