Fix NPE on TransportActionListener for elasticsearch 2
This commit is contained in:
parent
23d3b75555
commit
8f552993a6
|
@ -76,7 +76,7 @@ public class TransportActionListener<T extends ActionResponse> implements Action
|
||||||
|
|
||||||
if (response instanceof BaseNodesResponse) {
|
if (response instanceof BaseNodesResponse) {
|
||||||
final BaseNodesResponse resp = (BaseNodesResponse) response;
|
final BaseNodesResponse resp = (BaseNodesResponse) response;
|
||||||
if (resp.failures().length > 0) {
|
if (resp.failures() != null && resp.failures().length > 0) {
|
||||||
span.setTag("elasticsearch.node.failures", resp.failures().length);
|
span.setTag("elasticsearch.node.failures", resp.failures().length);
|
||||||
}
|
}
|
||||||
span.setTag("elasticsearch.node.cluster.name", resp.getClusterName().value());
|
span.setTag("elasticsearch.node.cluster.name", resp.getClusterName().value());
|
||||||
|
|
Loading…
Reference in New Issue