Merge pull request #1410 from huangzhhui/master

Fixed tracer cannot trace the call chains of redis connection that created by `Hyperf\Redis\RedisFactory`
This commit is contained in:
黄朝晖 2020-03-12 14:22:41 +08:00 committed by GitHub
commit 7165eafb04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,7 @@
## Fixed ## Fixed
- [#1405](https://github.com/hyperf/hyperf/pull/1405) Fixed attributes are not right, when the model has property `hidden`. - [#1405](https://github.com/hyperf/hyperf/pull/1405) Fixed attributes are not right, when the model has property `hidden`.
- [#1410](https://github.com/hyperf/hyperf/pull/1410) Fixed tracer cannot trace the call chains of redis connection that created by `Hyperf\Redis\RedisFactory`.
# v1.1.19 - 2020-03-05 # v1.1.19 - 2020-03-05

View File

@ -24,4 +24,10 @@ class RedisProxy extends Redis
$this->poolName = $pool; $this->poolName = $pool;
} }
public function __call($name, $arguments)
{
return parent::__call($name, $arguments);
}
} }

View File

@ -16,6 +16,7 @@ use Hyperf\Di\Annotation\Aspect;
use Hyperf\Di\Aop\AroundInterface; use Hyperf\Di\Aop\AroundInterface;
use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Di\Aop\ProceedingJoinPoint;
use Hyperf\Redis\Redis; use Hyperf\Redis\Redis;
use Hyperf\Redis\RedisProxy;
use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanStarter;
use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SpanTagManager;
use Hyperf\Tracer\SwitchManager; use Hyperf\Tracer\SwitchManager;
@ -34,6 +35,7 @@ class RedisAspect implements AroundInterface
public $classes public $classes
= [ = [
Redis::class . '::__call', Redis::class . '::__call',
RedisProxy::class . '::__call',
]; ];
/** /**