diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d2ed0384..25b86a3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ## Fixed - [#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 diff --git a/src/redis/src/RedisProxy.php b/src/redis/src/RedisProxy.php index 9e59a953e..39ea0afc9 100644 --- a/src/redis/src/RedisProxy.php +++ b/src/redis/src/RedisProxy.php @@ -24,4 +24,10 @@ class RedisProxy extends Redis $this->poolName = $pool; } + + public function __call($name, $arguments) + { + return parent::__call($name, $arguments); + } + } diff --git a/src/tracer/src/Aspect/RedisAspect.php b/src/tracer/src/Aspect/RedisAspect.php index 5caf6805f..32529be77 100644 --- a/src/tracer/src/Aspect/RedisAspect.php +++ b/src/tracer/src/Aspect/RedisAspect.php @@ -16,6 +16,7 @@ use Hyperf\Di\Annotation\Aspect; use Hyperf\Di\Aop\AroundInterface; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Redis\Redis; +use Hyperf\Redis\RedisProxy; use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; @@ -34,6 +35,7 @@ class RedisAspect implements AroundInterface public $classes = [ Redis::class . '::__call', + RedisProxy::class . '::__call', ]; /**