update witness class in elasticsearch-6.x-plugin (#228)
* update witness class in elasticsearch-6.x-plugin * update test cases in elasticsearch-6.x-plugin * update the supported list Co-authored-by: xzy <xiongzheyuan@shouqianba.com>
This commit is contained in:
parent
f8deb7c30b
commit
438d295423
|
|
@ -70,7 +70,8 @@ jobs:
|
|||
- dubbo-3.x-scenario
|
||||
- ehcache-2.x-scenario
|
||||
- elasticsearch-5.x-scenario
|
||||
- elasticsearch-6.x-scenario
|
||||
- elasticsearch-rest-high-level-6.x-scenario
|
||||
- elasticsearch-transport-6.x-scenario
|
||||
- elasticsearch-7.x-scenario
|
||||
- exception-checker-spring-scenario
|
||||
- exception-checker-tomcat-scenario
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Release Notes.
|
|||
8.12.0
|
||||
------------------
|
||||
* Fix `Shenyu plugin`'s NPE in reading read trace ID when IgnoredTracerContext is used in the context.
|
||||
* Fix `onHalfClose` using span operation name `/Request/onComplete` but not `/Request/onHalfClose`
|
||||
* Update witness class in elasticsearch-6.x-plugin, avoid throw NPE.
|
||||
* Fix `onHalfClose` using span operation name `/Request/onComplete` instead of the worng name `/Request/onHalfClose`.
|
||||
|
||||
#### Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -260,6 +260,6 @@ public class RestHighLevelClientInstrumentation extends ClassEnhancePluginDefine
|
|||
|
||||
@Override
|
||||
protected String[] witnessClasses() {
|
||||
return new String[] {Constants.TASK_TRANSPORT_CHANNEL_WITNESS_CLASSES};
|
||||
return new String[] {Constants.CREATE_INDEX_RESPONSE_WITNESS_CLASSES};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class Constants {
|
|||
//witnessClasses
|
||||
public static final String TASK_TRANSPORT_CHANNEL_WITNESS_CLASSES = "org.elasticsearch.transport.TaskTransportChannel";
|
||||
public static final String SEARCH_HITS_WITNESS_CLASSES = "org.elasticsearch.search.SearchHits";
|
||||
public static final String CREATE_INDEX_RESPONSE_WITNESS_CLASSES = "org.elasticsearch.client.indices.CreateIndexResponse";
|
||||
|
||||
//es operator name
|
||||
public static final String CREATE_OPERATOR_NAME = "Elasticsearch/CreateRequest";
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ metrics based on the tracing data.
|
|||
* [Xmemcached](https://github.com/killme2008/xmemcached) 2.x
|
||||
* [Elasticsearch](https://github.com/elastic/elasticsearch)
|
||||
* [transport-client](https://github.com/elastic/elasticsearch/tree/v5.2.0/client/transport) 5.2.x-5.6.x
|
||||
* [transport-client](https://github.com/elastic/elasticsearch/tree/v6.7.1/client/transport) 6.7.1-6.8.4
|
||||
* [transport-client](https://github.com/elastic/elasticsearch/tree/v6.2.3/client/transport) 6.2.3-6.8.4
|
||||
* [transport-client](https://github.com/elastic/elasticsearch/tree/7.0/client/transport) 7.0.0-7.5.2
|
||||
* [rest-high-level-client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.7/index.html) 6.7.1-6.8.4
|
||||
* [rest-high-level-client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.0/java-rest-high.html) 7.0.0-7.5.2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
home="$(cd "$(dirname $0)"; pwd)"
|
||||
|
||||
java -jar ${agent_opts} -Dskywalking.plugin.elasticsearch.trace_dsl=true ${home}/../libs/elasticsearch-rest-high-level-6.x-scenario.jar &
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
segmentItems:
|
||||
- serviceName: elasticsearch-6.x-scenario
|
||||
- serviceName: elasticsearch-rest-high-level-6.x-scenario
|
||||
segmentSize: ge 1
|
||||
segments:
|
||||
- segmentId: not null
|
||||
|
|
@ -307,124 +307,6 @@ segmentItems:
|
|||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/IndexRequest
|
||||
parentSpanId: 0
|
||||
spanId: 21
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/actionGet
|
||||
parentSpanId: 0
|
||||
spanId: 22
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Local
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/GetRequest
|
||||
parentSpanId: 0
|
||||
spanId: 23
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/SearchRequest
|
||||
parentSpanId: 0
|
||||
spanId: 24
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/UpdateRequest
|
||||
parentSpanId: 0
|
||||
spanId: 25
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/DeleteRequest
|
||||
parentSpanId: 0
|
||||
spanId: 26
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/DeleteIndexRequest
|
||||
parentSpanId: 0
|
||||
spanId: 27
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GET:/elasticsearch-case/case/elasticsearch
|
||||
parentSpanId: -1
|
||||
spanId: 0
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>elasticsearch-6.x-scenario</artifactId>
|
||||
<artifactId>elasticsearch-rest-high-level-6.x-scenario</artifactId>
|
||||
<version>5.0.0</version>
|
||||
|
||||
<name>skywalking-elasticsearch-6.x-scenario</name>
|
||||
<name>skywalking-elasticsearch-rest-high-level-6.x-scenario</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
|
@ -56,12 +56,6 @@
|
|||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<!-- elasticsearch transport-client -->
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>transport</artifactId>
|
||||
<version>${test.framework.version}</version>
|
||||
</dependency>
|
||||
<!-- elasticsearch rest-high-level-client -->
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
|
|
@ -86,7 +80,7 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>elasticsearch-6.x-scenario</finalName>
|
||||
<finalName>elasticsearch-rest-high-level-6.x-scenario</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>./bin</directory>
|
||||
<fileMode>0775</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/elasticsearch-rest-high-level-6.x-scenario.jar</source>
|
||||
<outputDirectory>./libs</outputDirectory>
|
||||
<fileMode>0775</fileMode>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
||||
|
|
@ -21,7 +21,6 @@ package org.apache.skywalking.apm.testcase.elasticsearch.controller;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.skywalking.apm.testcase.elasticsearch.RestHighLevelClientCase;
|
||||
import org.apache.skywalking.apm.testcase.elasticsearch.TransportClientCase;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -36,9 +35,6 @@ public class CaseController {
|
|||
@Autowired
|
||||
private RestHighLevelClientCase restHighLevelClientCase;
|
||||
|
||||
@Autowired
|
||||
private TransportClientCase transportClientCase;
|
||||
|
||||
@GetMapping("/healthcheck")
|
||||
public String healthcheck() throws Exception {
|
||||
restHighLevelClientCase.healthcheck();
|
||||
|
|
@ -48,8 +44,6 @@ public class CaseController {
|
|||
@GetMapping("/elasticsearch")
|
||||
public String elasticsearch() throws Exception {
|
||||
restHighLevelClientCase.elasticsearch();
|
||||
transportClientCase.elasticsearch();
|
||||
|
||||
return "Success";
|
||||
}
|
||||
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
|
||||
home="$(cd "$(dirname $0)"; pwd)"
|
||||
|
||||
java -jar ${agent_opts} -Dskywalking.plugin.elasticsearch.trace_dsl=true ${home}/../libs/elasticsearch-6.x-scenario.jar &
|
||||
java -jar ${agent_opts} -Dskywalking.plugin.elasticsearch.trace_dsl=true ${home}/../libs/elasticsearch-transport-6.x-scenario.jar &
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
segmentItems:
|
||||
- serviceName: elasticsearch-transport-6.x-scenario
|
||||
segmentSize: ge 1
|
||||
segments:
|
||||
- segmentId: not null
|
||||
spans:
|
||||
- operationName: Elasticsearch/IndexRequest
|
||||
parentSpanId: 0
|
||||
spanId: 1
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/actionGet
|
||||
parentSpanId: 0
|
||||
spanId: 2
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Local
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/GetRequest
|
||||
parentSpanId: 0
|
||||
spanId: 3
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/SearchRequest
|
||||
parentSpanId: 0
|
||||
spanId: 4
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/UpdateRequest
|
||||
parentSpanId: 0
|
||||
spanId: 5
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/DeleteRequest
|
||||
parentSpanId: 0
|
||||
spanId: 6
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
- {key: es.types, value: not null}
|
||||
- {key: db.statement, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Elasticsearch/DeleteIndexRequest
|
||||
parentSpanId: 0
|
||||
spanId: 7
|
||||
spanLayer: Database
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 48
|
||||
isError: false
|
||||
spanType: Exit
|
||||
peer: not null
|
||||
tags:
|
||||
- {key: db.type, value: Elasticsearch}
|
||||
- {key: db.instance, value: not null}
|
||||
- {key: node.address, value: not null}
|
||||
- {key: es.indices, value: not null}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: GET:/elasticsearch-case/case/elasticsearch
|
||||
parentSpanId: -1
|
||||
spanId: 0
|
||||
spanLayer: Http
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 1
|
||||
isError: false
|
||||
spanType: Entry
|
||||
peer: ''
|
||||
tags:
|
||||
- {key: url, value: 'http://localhost:8080/elasticsearch-case/case/elasticsearch'}
|
||||
- {key: http.method, value: GET}
|
||||
skipAnalysis: 'false'
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
type: jvm
|
||||
entryService: http://localhost:8080/elasticsearch-case/case/elasticsearch
|
||||
healthCheck: http://localhost:8080/elasticsearch-case/case/healthcheck
|
||||
startScript: ./bin/startup.sh
|
||||
environment:
|
||||
- elasticsearch.server=elasticsearch-server-6.x:9200
|
||||
dependencies:
|
||||
elasticsearch-server-6.x:
|
||||
image: bitnami/elasticsearch:${CASE_SERVER_IMAGE_VERSION}
|
||||
hostname: elasticsearch-server-6.x
|
||||
removeOnExit: true
|
||||
expose:
|
||||
- 9200
|
||||
environment:
|
||||
- ELASTICSEARCH_CLUSTER_NAME=docker-node
|
||||
- xpack.security.enabled=false
|
||||
- bootstrap.memory_lock=true
|
||||
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
|
||||
- discovery.type=single-node
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>elasticsearch-transport-6.x-scenario</artifactId>
|
||||
<version>5.0.0</version>
|
||||
|
||||
<name>skywalking-elasticsearch-transport-6.x-scenario</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
|
||||
<test.framework.version>6.8.6</test.framework.version>
|
||||
<docker.image.version>${test.framework.version}</docker.image.version>
|
||||
|
||||
<spring-boot.version>2.1.4.RELEASE</spring-boot.version>
|
||||
<log4j.version>2.8.1</log4j.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- spring boot -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<!-- elasticsearch transport-client -->
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>transport</artifactId>
|
||||
<version>${test.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>${test.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>elasticsearch-transport-6.x-scenario</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<configuration>
|
||||
<source>${compiler.version}</source>
|
||||
<target>${compiler.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>1.5.9.RELEASE</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/elasticsearch-6.x-scenario.jar</source>
|
||||
<source>${project.build.directory}/elasticsearch-transport-6.x-scenario.jar</source>
|
||||
<outputDirectory>./libs</outputDirectory>
|
||||
<fileMode>0775</fileMode>
|
||||
</file>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.testcase.elasticsearch;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
SpringApplication.run(Application.class, args);
|
||||
} catch (Exception e) {
|
||||
// Never do this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.testcase.elasticsearch.controller;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.skywalking.apm.testcase.elasticsearch.TransportClientCase;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/elasticsearch-case/case")
|
||||
public class CaseController {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(CaseController.class);
|
||||
|
||||
@Autowired
|
||||
private TransportClientCase transportClientCase;
|
||||
|
||||
@GetMapping("/healthcheck")
|
||||
public String healthcheck() throws Exception {
|
||||
return "Success";
|
||||
}
|
||||
|
||||
@GetMapping("/elasticsearch")
|
||||
public String elasticsearch() throws Exception {
|
||||
transportClientCase.elasticsearch();
|
||||
return "Success";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
server:
|
||||
port: 8080
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_ERR">
|
||||
<PatternLayout charset="UTF-8" pattern="[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="WARN">
|
||||
<AppenderRef ref="Console"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
6.2.3
|
||||
6.3.2
|
||||
6.4.1
|
||||
6.5.3
|
||||
6.6.2
|
||||
6.7.2
|
||||
6.8.4
|
||||
Loading…
Reference in New Issue