Merge pull request #737 from hooklife/patch-1

修正 SwitchManager isEnable 判断
This commit is contained in:
黄朝晖 2019-10-17 15:05:38 +08:00 committed by GitHub
commit 828dabdfd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@
- [#713](https://github.com/hyperf-cloud/hyperf/pull/713) Fixed `ignoreAnnotations` does not works when cache is used.
- [#717](https://github.com/hyperf-cloud/hyperf/pull/717) Fixed the validator will be created repeatedly in `getValidatorInstance`.
- [#724](https://github.com/hyperf-cloud/hyperf/pull/724) Fixed `db:seed` command without database selected.
- [#737](https://github.com/hyperf-cloud/hyperf/pull/737) Fixed custom process does not enable for tracer.
# v1.1.1 - 2019-10-08

View File

@ -13,7 +13,7 @@ declare(strict_types=1);
namespace Hyperf\Tracer;
use Hyperf\Utils\Context;
use Psr\Http\Message\ServerRequestInterface;
use OpenTracing\Span;
class SwitchManager
{
@ -46,6 +46,6 @@ class SwitchManager
return false;
}
return $this->config[$identifier] && Context::get(ServerRequestInterface::class) instanceof ServerRequestInterface;
return $this->config[$identifier] && Context::get('tracer.root') instanceof Span;
}
}