add e2e test for kafka transporter#42
Conversation
| # limitations under the License. | ||
|
|
||
| logs: | ||
| {{- range .logs }} |
There was a problem hiding this comment.
Same issue as apache/skywalking#7849 (comment), please read that thread.
|
Do we have any approach to set docker-compose file by the environment to reduce copy-codes? @kezhenxu94 |
Not now, I'm also considering to provide this feature |
|
Please fixe dead link. |
| # limitations under the License. | ||
|
|
||
| spans: | ||
| {{- range .spans}} |
There was a problem hiding this comment.
range should be replaced by contains. We have similar suggestions in the main repo. Please check.
kezhenxu94
left a comment
There was a problem hiding this comment.
.github/workflows/e2e.yaml
Outdated
| matrix: | ||
| case: | ||
| - name: gRPC | ||
| path: test/e2e/case/base/e2e.yaml |
There was a problem hiding this comment.
What about changing this to test/e2e/case/grpc/e2e.yaml?
test/e2e/case/kafka/e2e.yaml
Outdated
| - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls | ||
| expected: expected/traces-list.yml | ||
| # native tracing: trace detail | ||
| - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 'POST:/info'|tail -n1|awk -F ' ' '{print $2}') |
There was a problem hiding this comment.
Don't use grep, refer to how we do this in th main repo
test/e2e/case/kafka/e2e.yaml
Outdated
| expected: expected/event-list.yml | ||
|
|
||
| # native log: logs list | ||
| - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) --trace-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 'POST:/info'|tail -n1|awk -F ' ' '{print $2}') |
| # limitations under the License. | ||
|
|
||
| events: | ||
| {{- range .events }} |
| # limitations under the License. | ||
|
|
||
| logs: | ||
| {{- range .logs }} |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| {{- range .}} |
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| {{- range .}} |
| # limitations under the License. | ||
|
|
||
| spans: | ||
| {{- range .spans}} |
| # limitations under the License. | ||
|
|
||
| traces: | ||
| {{- range .traces }} |
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
| {{- if eq .servicecode "e2e-service-provider" }} | ||
| {{- cintains .refs }} | ||
| - traceid: {{ notEmpty .traceid }} | ||
| parentsegmentid: {{ notEmpty .parentsegmentid }} | ||
| parentspanid: 1 | ||
| type: CROSS_PROCESS | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if eq .servicecode "e2e-service-consumer" }} |
There was a problem hiding this comment.
| {{- if eq .servicecode "e2e-service-provider" }} | |
| {{- cintains .refs }} | |
| - traceid: {{ notEmpty .traceid }} | |
| parentsegmentid: {{ notEmpty .parentsegmentid }} | |
| parentspanid: 1 | |
| type: CROSS_PROCESS | |
| {{- end }} | |
| {{- end }} | |
| {{- if eq .servicecode "e2e-service-consumer" }} | |
| {{- if eq .servicecode "e2e-service-provider" }} | |
| {{- cintains .refs }} | |
| - traceid: {{ notEmpty .traceid }} | |
| parentsegmentid: {{ notEmpty .parentsegmentid }} | |
| parentspanid: 1 | |
| type: CROSS_PROCESS | |
| {{- end }} | |
| {{- end }} | |
| {{- if eq .servicecode "e2e-service-consumer" }} |
Please note, using {{- if eq .servicecode "e2e-service-provider" }} and {{- if eq .servicecode "e2e-service-consumer" }} inside contains, you actually only verify ONE of them, as soon as one of them satisfies the condition, the others won't be verified
| {{- if eq (index .endpointnames 0) "HikariCP/Connection/getConnection" }} | ||
| - HikariCP/Connection/getConnection | ||
| {{- end }} | ||
| {{- if eq (index .endpointnames 0) "HikariCP/Connection/close" }} | ||
| - HikariCP/Connection/close | ||
| {{- end }} | ||
| {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/execute" }} | ||
| - H2/JDBI/Statement/execute | ||
| {{- end}} | ||
| {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/executeQuery" }} | ||
| - H2/JDBI/Statement/executeQuery | ||
| {{- end}} | ||
| {{- if eq (index .endpointnames 0) "H2/JDBI/PreparedStatement/executeQuery" }} | ||
| - H2/JDBI/PreparedStatement/executeQuery | ||
| {{- end }} | ||
| {{- if eq (index .endpointnames 0) "POST:/info" }} | ||
| - POST:/info | ||
| {{- end }} | ||
| {{- if eq (index .endpointnames 0) "POST:/users" }} | ||
| - POST:/users | ||
| {{- end }} |
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
|
|
||
| {{- range .}} | ||
| {{- contains .}} | ||
| {{- if eq .name "POST:/info" }} |
kezhenxu94
left a comment
There was a problem hiding this comment.
@dmsolr I'd suggest you overhaul all the if statements in the expected data file, they are mostly misused
| {{- contains .traces }} | ||
| - segmentid: {{ notEmpty .segmentid }} | ||
| endpointnames: | ||
| {{- if eq (index .endpointnames 0) "POST:/info" }} |
| {{- if eq .type "Exit" }} | ||
| /info | ||
| {{- end }} | ||
| {{- if eq .type "Entry" }} | ||
| POST:/info | ||
| {{- end }} | ||
| type: {{ notEmpty .type }} | ||
| peer: | ||
| {{- if eq .type "Exit" }} | ||
| provider:9090 | ||
| {{ else }} | ||
| "" | ||
| {{- end }} | ||
| component: | ||
| {{- if eq .type "Exit" }} | ||
| SpringRestTemplate | ||
| {{- end }} | ||
| {{- if eq .type "Entry" }} | ||
| Tomcat | ||
| {{- end }} |
| spanid: {{ .spanid }} | ||
| parentspanid: {{ .parentspanid }} | ||
| refs: | ||
| {{- if eq .servicecode "e2e-service-provider" }} |
* main: (28 commits) fix release doc (#61) Support Jedis' Transaction and fix duplicated enhancement (#57) Initialize 8.9.0 iteration (#59) Polish release shell and doc. (#58) fix rocketmq message header properties garbled characters issue (#54) Fix netty-socketio plugin test failure (#56) Add okhttp2.x plugin (#49) add e2e test for kafka transporter (#42) Fix version badge (#53) Add JDK17 supported declaration. (#52) Fix instrumentation v2 API doesn't work for constructor instrumentation. (#51) Add kylin jdbc plugin (#45) Fix version compatibility for JSON-RPC4J Plugin (#50) Feature add clickhouse jdbc plugin (#41) Update menu.yml (#48) Fix format. (#47) Add new menu for the document (#46) Doc: Update setup agent in kubernetes from 'containers' to 'initContainers'. (#44) The httpasyncclient-4.x-plugin does not take effect every time. (#40) Add an agent plugin to support Jackson (#39) ... # Conflicts: # .github/workflows/plugins-test.3.yaml # CHANGES.md # docs/en/setup/service-agent/java-agent/README.md # docs/menu.yml
CHANGESlog.