Skip to content

Commit 129a7be

Browse files
author
Matias Melograno
committed
deprecated old telemetry
1 parent dbf7a15 commit 129a7be

File tree

3 files changed

+0
-130
lines changed

3 files changed

+0
-130
lines changed

src/SplitIO/Component/Cache/MetricsCache.php

Lines changed: 0 additions & 81 deletions
This file was deleted.

src/SplitIO/Sdk/Client.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use SplitIO\Component\Cache\EventsCache;
55
use SplitIO\Component\Common\Di;
66
use SplitIO\Metrics;
7-
use SplitIO\Component\Cache\MetricsCache;
87
use SplitIO\Sdk\Events\EventDTO;
98
use SplitIO\Sdk\Events\EventQueueMessage;
109
use SplitIO\Sdk\QueueMetadataMessage;
@@ -247,11 +246,6 @@ private function registerData($impressions, $attributes, $metricName, $latency =
247246
if (isset($this->impressionListener)) {
248247
$this->impressionListener->sendDataToClient($impressions, $attributes);
249248
}
250-
251-
//Register latency value
252-
if (!is_null($latency)) {
253-
MetricsCache::addLatencyOnBucket($metricName, Metrics::getBucketForLatencyMicros($latency));
254-
}
255249
} catch (\Exception $e) {
256250
SplitApp::logger()->critical(
257251
': An exception occurred when trying to store impressions.'

tests/Suite/Component/KeysStaticMethodsTest.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace SplitIO\Test\Suite\Component;
44

55
use SplitIO\Component\Cache\ImpressionCache;
6-
use SplitIO\Component\Cache\MetricsCache;
76
use SplitIO\Component\Cache\SplitCache;
87
use SplitIO\Component\Cache\SegmentCache;
98
use SplitIO\Component\Cache\TrafficTypeCache;
@@ -18,48 +17,6 @@ private static function getStaticMethodAsPublic($className, $methodName)
1817
return $refMethod;
1918
}
2019

21-
public function testMetricsGetCacheKeyForLatencyButcket()
22-
{
23-
$method = self::getStaticMethodAsPublic('SplitIO\Component\Cache\MetricsCache', 'getCacheKeyForLatencyBucket');
24-
$key = $method->invoke(null, 'abc', 'def');
25-
$this->assertEquals(
26-
$key,
27-
'SPLITIO/php-' . \SplitIO\version() . '/' . \SplitIO\getHostIpAddress() . '/latency.abc.bucket.def'
28-
);
29-
}
30-
31-
public function testGetCacheKeySearchLatencyPattern()
32-
{
33-
$method = self::getStaticMethodAsPublic('SplitIO\Component\Cache\MetricsCache', 'getCacheKeySearchLatencyPattern');
34-
$key = $method->invoke(null);
35-
$this->assertEquals(
36-
$key,
37-
'SPLITIO/php-' . \SplitIO\version() . '/' . \SplitIO\getHostIpAddress() . '/latency.*.bucket.*'
38-
);
39-
}
40-
41-
public function testGetMetricNameFromKey()
42-
{
43-
$method = self::getStaticMethodAsPublic('SplitIO\Component\Cache\MetricsCache', 'getMetricNameFromKey');
44-
$metricName = $method->invoke(
45-
null,
46-
'SPLITIO/php-' . \SplitIO\version() . '/' . \SplitIO\getHostIpAddress() . '/latency.abc.bucket.def'
47-
);
48-
49-
$this->assertEquals($metricName, 'abc');
50-
}
51-
52-
public function testGetBucketFromKey()
53-
{
54-
$method = self::getStaticMethodAsPublic('SplitIO\Component\Cache\MetricsCache', 'getBucketFromKey');
55-
$metricName = $method->invoke(
56-
null,
57-
'SPLITIO/php-' . \SplitIO\version() . '/' . \SplitIO\getHostIpAddress() . '/latency.abc.bucket.def'
58-
);
59-
60-
$this->assertEquals($metricName, 'def');
61-
}
62-
6320
public function testSplitGetCacheKeyForSinceParameter()
6421
{
6522
$method = self::getStaticMethodAsPublic('SplitIO\Component\Cache\SplitCache', 'getCacheKeyForSinceParameter');

0 commit comments

Comments
 (0)