public fromConsumedMessage ( PhpAmqpLib\Message\AMQPMessage $message ) : |
||
$message | PhpAmqpLib\Message\AMQPMessage | |
리턴 |
/** * {@inheritdoc} */ public function execute(AMQPMessage $msg) { $span = $this->amqpSpanFactory->fromReceivedMessage($msg); $this->tracer->trace([$span]); $this->spanStack->push($span); $result = $this->decoratedConsumer->execute($msg); $this->tracer->trace([$this->amqpSpanFactory->fromConsumedMessage($msg)]); $this->spanStack->pop(); return $result; }
function let(ConsumerInterface $decoratedConsumer, Tracer $tracer, SpanStack $spanStack, AmqpSpanFactory $amqpSpanFactory) { $span = new Span(Identifier::fromString('1234'), 'name', Identifier::fromString('1234')); $amqpSpanFactory->fromReceivedMessage(Argument::type(AMQPMessage::class))->willReturn($span); $amqpSpanFactory->fromConsumedMessage(Argument::type(AMQPMessage::class))->willReturn($span); $this->beConstructedWith($decoratedConsumer, $tracer, $spanStack, $amqpSpanFactory); }