Skip to main content

Class: RedisWatcher

Defined in: watchers/redis.watcher.ts:41

RedisWatcher monitors Redis operations and tracks command execution, performance metrics, and results while masking sensitive data.

Implements​

  • OnModuleInit
  • OnModuleDestroy

Constructors​

Constructor​

new RedisWatcher(collector, nestlensConfig, redisClient?): RedisWatcher

Defined in: watchers/redis.watcher.ts:46

Parameters​

collector​

CollectorService

nestlensConfig​

NestLensConfig

redisClient?​

unknown

Returns​

RedisWatcher

Methods​

onModuleDestroy()​

onModuleDestroy(): void

Defined in: watchers/redis.watcher.ts:146

Puts back what it replaced.

The wrappers live on an object the application owns and keeps, so closing the module has to give it back. Otherwise the host goes on calling through a watcher whose collector is gone — and where a process builds the module more than once against the same object, as tests and nest start --hmr do, each round wraps the last: one call, one entry per layer.

Returns​

void

Implementation of​

OnModuleDestroy.onModuleDestroy


onModuleInit()​

onModuleInit(): void

Defined in: watchers/redis.watcher.ts:58

Returns​

void

Implementation of​

OnModuleInit.onModuleInit