apm-sniffer/apm-sdk-plugin/elasticsearch-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v7/interceptor/IndicesClientDeleteMethodsInterceptor.java [43:61]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
        MethodInterceptResult result) throws Throwable {
        DeleteIndexRequest deleteIndexRequest = (DeleteIndexRequest) allArguments[0];

        RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) objInst.getSkyWalkingDynamicField();
        if (restClientEnhanceInfo != null) {
            AbstractSpan span = ContextManager.createExitSpan(Constants.DELETE_OPERATOR_NAME, restClientEnhanceInfo.getPeers());
            span.setComponent(ComponentsDefine.REST_HIGH_LEVEL_CLIENT);

            Tags.DB_TYPE.set(span, DB_TYPE);
            Tags.DB_INSTANCE.set(span, Arrays.asList(deleteIndexRequest.indices()).toString());
            SpanLayer.asDB(span);

            if (allArguments.length > 2 && allArguments[2] != null && allArguments[2] instanceof ActionListener) {
                allArguments[2] = AdapterUtil.wrapActionListener(restClientEnhanceInfo, Constants.DELETE_OPERATOR_NAME,
                                                                 (ActionListener) allArguments[2]);
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientDeleteMethodsInterceptor.java [41:58]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
        MethodInterceptResult result) throws Throwable {
        DeleteIndexRequest deleteIndexRequest = (DeleteIndexRequest) allArguments[0];

        RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) objInst.getSkyWalkingDynamicField();
        if (restClientEnhanceInfo != null) {
            AbstractSpan span = ContextManager.createExitSpan(Constants.DELETE_OPERATOR_NAME, restClientEnhanceInfo.getPeers());
            span.setComponent(ComponentsDefine.REST_HIGH_LEVEL_CLIENT);

            Tags.DB_TYPE.set(span, DB_TYPE);
            Tags.DB_INSTANCE.set(span, Arrays.asList(deleteIndexRequest.indices()).toString());
            SpanLayer.asDB(span);
            if (allArguments.length > 2 && allArguments[2] != null && allArguments[2] instanceof ActionListener) {
                allArguments[2] = AdapterUtil.wrapActionListener(restClientEnhanceInfo, Constants.DELETE_OPERATOR_NAME,
                                                                 (ActionListener) allArguments[2]);
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



