Fix NPE on TransportActionListener for elasticsearch 2
MODIFY
dd-java-agent/instrumentation/elasticsearch/transport-2/src/main/java/datadog/trace/instrumentation/elasticsearch2/TransportActionListener.java
dd-java-agent/instrumentation/elasticsearch/transport-2/src/main/java/datadog/trace/instrumentation/elasticsearch2/TransportActionListener.java
@@ -76,7 +76,7 @@ public class TransportActionListener<T extends ActionResponse> implements Action
if (response instanceof BaseNodesResponse) {
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.cluster.name", resp.getClusterName().value());

Fix NPE on TransportActionListener for elasticsearch 2