@@ -33,7 +33,10 @@ export const instrumentRedis = generateInstrumentOnce(INTEGRATION_NAME, () => {
3333
3434 span . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , 'auto.db.otel.redis' ) ;
3535
36+ const cacheOperation = getCacheOperation ( redisCommand ) ;
37+
3638 if (
39+ ! cacheOperation ||
3740 ! _redisOptions ?. cachePrefixes ||
3841 ! shouldConsiderForCache ( redisCommand , safeKey , _redisOptions . cachePrefixes )
3942 ) {
@@ -49,14 +52,11 @@ export const instrumentRedis = generateInstrumentOnce(INTEGRATION_NAME, () => {
4952 span . setAttributes ( { 'network.peer.address' : networkPeerAddress , 'network.peer.port' : networkPeerPort } ) ;
5053 }
5154
52- const cacheOperation = getCacheOperation ( redisCommand ) ;
53-
54- if ( ! cacheOperation ) {
55- // redis command unsupported as cache operation
56- return ;
57- }
58-
55+ // eslint-disable-next-line no-console
56+ console . log ( 'response' , response ) ;
5957 const cacheItemSize = calculateCacheItemSize ( response ) ;
58+ // eslint-disable-next-line no-console
59+ console . log ( 'cacheItemSize' , cacheItemSize ) ;
6060 if ( cacheItemSize ) {
6161 span . setAttribute ( SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE , cacheItemSize ) ;
6262 }
@@ -71,6 +71,8 @@ export const instrumentRedis = generateInstrumentOnce(INTEGRATION_NAME, () => {
7171 } ) ;
7272
7373 span . updateName ( safeKey . length > 1024 ? `${ safeKey . substring ( 0 , 1024 ) } ...` : safeKey ) ;
74+ // eslint-disable-next-line no-console
75+ console . log ( 'span' , span ) ;
7476 } ,
7577 } ) ;
7678} ) ;
0 commit comments