Skip to content

Commit 8b87b02

Browse files
committed
remove duplicated metric capture
1 parent 6b83e6d commit 8b87b02

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

src/cache/redis.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,6 @@ export class RedisCache<T = unknown> implements Cache<T> {
108108

109109
await chain.exec()
110110

111-
// Loop again, but this time to record these in metrics
112-
const now = Date.now()
113-
for (const entry of entries) {
114-
// Only record metrics if feed Id is present, otherwise assuming value is not adapter response to record
115-
const response = entry.value as unknown as AdapterResponse
116-
const feedId = response.meta?.metrics?.feedId
117-
if (feedId) {
118-
const providerTime = response.timestamps?.providerIndicatedTimeUnixMs
119-
const timeDelta = providerTime ? now - providerTime : undefined
120-
121-
// Record cache set count, max age, and staleness (set to 0 for cache set)
122-
const label = cacheMetricsLabel(entry.key, feedId, CacheTypes.Redis)
123-
cacheSet(label, ttl, timeDelta)
124-
}
125-
}
126-
127111
// Record exec command sent to Redis
128112
recordRedisCommandMetric(CMD_SENT_STATUS.SUCCESS, 'exec')
129113
}

0 commit comments

Comments
 (0)