diff --git a/src/Cache/Adapter/CircuitBreaker.php b/src/Cache/Adapter/CircuitBreaker.php index 2fb9e9eb93..3ef064689d 100644 --- a/src/Cache/Adapter/CircuitBreaker.php +++ b/src/Cache/Adapter/CircuitBreaker.php @@ -3,11 +3,11 @@ namespace Utopia\Cache\Adapter; use Utopia\Cache\Adapter; -use Utopia\Cache\TelemetryAware; +use Utopia\Cache\Feature; use Utopia\CircuitBreaker\CircuitBreaker as UtopiaCircuitBreaker; use Utopia\Telemetry\Adapter as Telemetry; -class CircuitBreaker implements Adapter, TelemetryAware +class CircuitBreaker implements Adapter, Feature\Telemetry { public function __construct( private readonly Adapter $adapter, @@ -106,7 +106,7 @@ class CircuitBreaker implements Adapter, TelemetryAware { $this->breaker->setTelemetry($telemetry); - if ($this->adapter instanceof TelemetryAware) { + if ($this->adapter instanceof Feature\Telemetry) { $this->adapter->setTelemetry($telemetry); } } diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php index 907b8db08d..5a9d4c5695 100644 --- a/src/Cache/Cache.php +++ b/src/Cache/Cache.php @@ -34,7 +34,7 @@ class Cache ['ExplicitBucketBoundaries' => [0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1]] ); - if ($this->adapter instanceof TelemetryAware) { + if ($this->adapter instanceof Feature\Telemetry) { $this->adapter->setTelemetry($telemetry); } } diff --git a/src/Cache/Feature/Telemetry.php b/src/Cache/Feature/Telemetry.php new file mode 100644 index 0000000000..f7026eb262 --- /dev/null +++ b/src/Cache/Feature/Telemetry.php @@ -0,0 +1,10 @@ +