You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/02/28 07:39:40 UTC

[skywalking-nodejs] branch master updated: Update IORedis Plugin, fill dbinstance tag as host if condition.select doesn't exist. (#73)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b2eecd  Update IORedis Plugin, fill dbinstance tag as host if condition.select doesn't exist. (#73)
1b2eecd is described below

commit 1b2eecd47dacb8208ee2048b921c232371c22ff4
Author: Tony <ji...@gmail.com>
AuthorDate: Mon Feb 28 15:39:32 2022 +0800

    Update IORedis Plugin, fill dbinstance tag as host if condition.select doesn't exist. (#73)
---
 src/plugins/IORedisPlugin.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/IORedisPlugin.ts b/src/plugins/IORedisPlugin.ts
index d4d2c76..d7ce3aa 100644
--- a/src/plugins/IORedisPlugin.ts
+++ b/src/plugins/IORedisPlugin.ts
@@ -49,7 +49,7 @@ class IORedisPlugin implements SwPlugin {
       span.layer = SpanLayer.CACHE;
       span.peer = host;
       span.tag(Tag.dbType('Redis'));
-      span.tag(Tag.dbInstance(`${this.condition.select}`));
+      span.tag(Tag.dbInstance(`${this.condition?.select ?? host}`));
 
       try {
         const ret = wrapPromise(span, _original.apply(this, args));