Tolerance\Tracer\SpanStack\SpanStack::push PHP Method

push() public method

Push a span in the stack.
public push ( Span $span ) : Span
$span Tolerance\Tracer\Span\Span
return Tolerance\Tracer\Span\Span
    public function push(Span $span);

Usage Example

 /**
  * @param GetResponseEvent $event
  */
 public function onKernelRequest(GetResponseEvent $event)
 {
     if (!$event->isMasterRequest()) {
         return;
     }
     $span = $this->httpFoundationSpanFactory->fromIncomingRequest($event->getRequest());
     $this->stack->push($span);
     $this->tracer->trace([$span]);
 }
All Usage Examples Of Tolerance\Tracer\SpanStack\SpanStack::push