From 72f90ec689f7a0ab21d0b712893206b258779623 Mon Sep 17 00:00:00 2001 From: huangzhhui Date: Wed, 31 Jul 2019 13:41:39 +0800 Subject: [PATCH] Adapted new version of openzipkin/zipkin --- src/Tracing.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Tracing.php b/src/Tracing.php index 63bd8d8..abf0942 100644 --- a/src/Tracing.php +++ b/src/Tracing.php @@ -16,7 +16,9 @@ use Hyperf\Utils\Traits\CoroutineProxy; use Psr\Http\Message\ServerRequestInterface; use Zipkin\Propagation\Map; +use Zipkin\Propagation\Propagation; use Zipkin\Span; +use Zipkin\Tracer; use Zipkin\TracingBuilder; use const Zipkin\Kind\SERVER; @@ -65,10 +67,8 @@ public function span(string $name, string $kind = SERVER) /** * All tracing commands start with a {@link Span}. Use a tracer to create spans. - * - * @return \Zipkin\Tracer */ - public function getTracer() + public function getTracer(): Tracer { return $this->__call(__FUNCTION__, func_get_args()); } @@ -76,10 +76,8 @@ public function getTracer() /** * When a trace leaves the process, it needs to be propagated, usually via headers. This utility * is used to inject or extract a trace context from remote requests. - * - * @return \Zipkin\Propagation\Propagation */ - public function getPropagation() + public function getPropagation(): Propagation { return $this->__call(__FUNCTION__, func_get_args()); } @@ -88,10 +86,9 @@ public function getPropagation() * When true, no recording is done and nothing is reported to zipkin. However, trace context is * still injected into outgoing requests. * - * @return bool * @see Span#isNoop() */ - public function isNoop() + public function isNoop(): bool { return $this->__call(__FUNCTION__, func_get_args()); }