Carry appName in FetchClusterServerInfo command
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
parent
01533543ef
commit
094ba3bfba
|
|
@ -27,6 +27,7 @@ import com.alibaba.csp.sentinel.command.CommandHandler;
|
||||||
import com.alibaba.csp.sentinel.command.CommandRequest;
|
import com.alibaba.csp.sentinel.command.CommandRequest;
|
||||||
import com.alibaba.csp.sentinel.command.CommandResponse;
|
import com.alibaba.csp.sentinel.command.CommandResponse;
|
||||||
import com.alibaba.csp.sentinel.command.annotation.CommandMapping;
|
import com.alibaba.csp.sentinel.command.annotation.CommandMapping;
|
||||||
|
import com.alibaba.csp.sentinel.util.AppNameUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
|
@ -69,6 +70,9 @@ public class FetchClusterServerInfoCommandHandler implements CommandHandler<Stri
|
||||||
.fluentPut("namespaceSet", namespaceSet)
|
.fluentPut("namespaceSet", namespaceSet)
|
||||||
.fluentPut("embedded", ClusterServerConfigManager.isEmbedded());
|
.fluentPut("embedded", ClusterServerConfigManager.isEmbedded());
|
||||||
|
|
||||||
|
// Since 1.5.0 the appName is carried so that the caller can identify the appName of the token server.
|
||||||
|
info.put("appName", AppNameUtil.getAppName());
|
||||||
|
|
||||||
return CommandResponse.ofSuccess(info.toJSONString());
|
return CommandResponse.ofSuccess(info.toJSONString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue