Skip to content

Commit

Permalink
Adapted new version of openzipkin/zipkin
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhhui committed Jul 31, 2019
1 parent 78f51c4 commit 72f90ec
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Tracing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -65,21 +67,17 @@ 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());
}

/**
* 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());
}
Expand All @@ -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());
}
Expand Down

0 comments on commit 72f90ec

Please sign in to comment.