Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/skywalking into re…
Browse files Browse the repository at this point in the history
…factor-heatmap
  • Loading branch information
fine committed Nov 26, 2019
2 parents 771bb19 + 5639c70 commit f9f91fe
Show file tree
Hide file tree
Showing 22 changed files with 681 additions and 9 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/docker-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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.

name: docker-ci

on: [push, pull_request]
env:
SKIP_TEST: true
DOCKER_DIR: ./docker
LOG_DIR: /tmp/skywalking
jobs:
build:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build docker image
run: make docker
- name: Bootstrap cluster
run: cd ${DOCKER_DIR} && docker-compose up -d
- name: Check port avaliable
run: |
source ./test/scripts/env.sh
echo "Waiting for OAP ready"
export PORT=11800
check_sw_port
echo "OAP is ready"
echo "Waiting for UI ready"
PORT=8080
check_sw_port
echo "UI is ready"
- name: Collect logs
run: |
mkdir -p ${LOG_DIR}
cd ${DOCKER_DIR}
docker-compose logs oap > ${LOG_DIR}/oap.txt
docker-compose logs ui > ${LOG_DIR}/ui.txt
docker-compose logs elasticsearch > ${LOG_DIR}/es.txt
continue-on-error: true
- uses: actions/upload-artifact@v1.0.0
continue-on-error: true
with:
name: logs
path: /tmp/skywalking
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Release Notes.
- BugFix: endpoint grouping rules may be not unique (#3510)
- Add feature to control the maximum agent log files (#3475)
- Agent support custom properties. (#3367)
- Add Light4j plugin (#3323)

#### Document
- Remove travis badge (#3763)
Expand Down
8 changes: 7 additions & 1 deletion Jenkinsfile-Agent-Test-2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (146)') {
stage('Test Cases Report (170)') {
steps {
echo "Test Cases Report"
}
Expand Down Expand Up @@ -105,6 +105,12 @@ pipeline {
sh 'bash test/plugin/run.sh dubbo-2.7.x-scenario'
}
}

stage('okhttp 3.0.x-3.14.x (34)') {
steps {
sh 'bash test/plugin/run.sh okhttp-scenario'
}
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile-Agent-Test-3
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (160)') {
stage('Test Cases Report (161)') {
steps {
echo "Test Cases Report"
}
Expand Down Expand Up @@ -122,7 +122,7 @@ pipeline {
}
}

stage('grpc 1.0.0-1.9.0 (21)') {
stage('grpc 1.6.0-1.25.0 (22)') {
steps {
sh 'bash test/plugin/run.sh grpc-scenario'
}
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ The text of each license is the standard Apache 2.0 license.
proto files from lyft/protoc-gen-validate: https://github.com/lyft/protoc-gen-validate Apache 2.0
proto files from gogo/googleapis: https://github.com/gogo/googleapis Apache 2.0
mvnw files from https://github.com/takari/maven-wrapper Apache 2.0


svg files from skywalking-ui/src/assets/icons: https://github.com/google/material-design-icons Apache 2.0
========================================================================
BSD licenses
========================================================================
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

SHELL := /bin/bash -o pipefail

export SW_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

export SW_OUT:=${SW_ROOT}/dist

SKIP_TEST?=false

init:
cd $(SW_ROOT) && git submodule update --init --recursive

.PHONY: build.all build.agent build.backend build.ui build.docker

build.all:
Expand Down Expand Up @@ -48,7 +52,7 @@ TAG?=latest

.PHONY: docker docker.all docker.oap

docker: build.docker docker.all
docker: init build.docker docker.all

DOCKER_TARGETS:=docker.oap docker.ui

Expand Down
2 changes: 1 addition & 1 deletion apm-dist/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ lodash 4.17.15: https://github.com/lodash/lodash MIT
Apache 2.0 licenses
========================================
echarts 4.1.0: https://github.com/apache/incubator-echarts Apache-2.0

Material Icons 3.0.1 https://github.com/google/material-design-icons Apache-2.0
========================================
BSD licenses
========================================
Expand Down
2 changes: 2 additions & 0 deletions docker/oap/Dockerfile.oap
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ WORKDIR skywalking

COPY log4j2.xml config/
COPY docker-entrypoint.sh .
RUN mkdir ext-config; \
mkdir ext-libs;

EXPOSE 12800 11800 1234

Expand Down
11 changes: 11 additions & 0 deletions docker/oap/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,14 @@ SW_CLUSTER=${SW_CLUSTER:-standalone}
SW_STORAGE=${SW_STORAGE:-h2}
SW_CONFIGURATION=${SW_CONFIGURATION:-none}
SW_TELEMETRY=${SW_TELEMETRY:-none}
EXT_LIB_DIR=/skywalking/ext-libs
EXT_CONFIG_DIR=/skywalking/ext-config

# If user wants to override application.yml, the one generated by docker-entrypoint.sh should be ignored.
[[ -f ${EXT_CONFIG_DIR}/application.yml ]] && SW_L0AD_CONFIG_FILE_FROM_VOLUME=true

# Override configuration files
cp -vfR ${EXT_CONFIG_DIR}/ config/
if [[ -z "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" ]] || [[ "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" != "true" ]]; then
generateApplicationYaml
echo "Generated application.yml"
Expand All @@ -439,6 +446,10 @@ for i in oap-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
done
for i in ${EXT_LIB_DIR}/*.jar
do
CLASSPATH="$i:$CLASSPATH"
done

set -ex
exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \
Expand Down
6 changes: 4 additions & 2 deletions docs/en/guides/Plugin-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ as the version number, it will be changed in the test for every version.
**Take following test cases as examples**
* [dubbo-2.7.x with JVM-container](../../../test/plugin/scenarios/dubbo-2.7.x-scenario/configuration.yml)
* [jetty with Tomcat-container](../../../test/plugin/scenarios/jetty-scenario/configuration.yml)
* [jetty with JVM-container](../../../test/plugin/scenarios/jetty-scenario/configuration.yml)
* [gateway with runningMode](../../../test/plugin/scenarios/gateway-scenario/configuration.yml)
* [canal with docker-compose](../../../test/plugin/scenarios/canal-scenario/configuration.yml)

Expand Down Expand Up @@ -630,13 +630,14 @@ canal 1.0.24-1.1.2 | 5 | 214.05


### Workload 2
#### Group 1 (2906.54s)
#### Group 1 (3936.54s)
scenario name | versions | elapsed time (sec)
---|---|---
spring-tx 4.x+ | 10 | 555.00
spring 4.3.x-5.2.x | 54 | 1769.32
dubbo 2.5.x-2.6.x | 10 | 367.23
dubbo 2.7.x | 4 | 214.99
okhttp 3.0.x-3.14.x | 34 | 1030

#### Group 2 (2550.66s)
scenario name | versions | elapsed time (sec)
Expand All @@ -661,6 +662,7 @@ scenario name | versions | elapsed time (sec)
---|---|---
spring async 4.3.x-5.1.x | 35 | 967.70
mongodb 3.4.0-3.11.1 | 17 | 1465.63
grcp 1.6.0-1.25.0 | 25 | 627.00

### Workload 4
#### Group 1 (2463.00s)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ services:
- ${env}
</#list>
</#if>
<#if start_script??>
- SCENARIO_START_SCRIPT=${start_script}
</#if>
- SCENARIO_NAME=${scenario_name}
- SCENARIO_VERSION=${scenario_version}
- SCENARIO_ENTRY_SERVICE=${entry_service}
Expand Down
21 changes: 21 additions & 0 deletions test/plugin/scenarios/okhttp-scenario/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/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} ${home}/../libs/okhttp-scenario.jar &
119 changes: 119 additions & 0 deletions test/plugin/scenarios/okhttp-scenario/config/expectedData.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# 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.

registryItems:
applications:
- {okhttp-scenario: nq 0}
instances:
- {okhttp-scenario: 1}
operationNames:
- okhttp-scenario: [/case/receiveContext-0, /okhttp-case/case/receiveContext-0,/case/healthCheck, /case/okhttp-case, /case/receiveContext-1]
heartbeat: []
segmentItems:
- applicationCode: okhttp-scenario
segmentSize: ge 5
segments:
- segmentId: not null
spans:
- operationName: Async/okhttp-case/case/receiveContext-0
operationId: 0
parentSpanId: 0
spanId: 1
spanLayer: null
startTime: nq 0
endTime: nq 0
componentId: 0
componentName: null
isError: false
spanType: Local
peer: null
peerId: 0
- operationName: /case/okhttp-case
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 14
componentName: null
isError: false
spanType: Entry
peer: null
peerId: 0
tags:
- {key: url, value: 'http://localhost:8080/okhttp-case/case/okhttp-case'}
- {key: http.method, value: GET}
- segmentId: not null
spans:
- operationName: /case/receiveContext-0
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 14
componentName: null
isError: false
spanType: Entry
peer: null
peerId: 0
tags:
- {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-0'}
- {key: http.method, value: GET}
refs:
- {parentEndpointId: 0, parentEndpoint: /okhttp-case/case/receiveContext-0, networkAddressId: 0, entryEndpointId: 0, refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '127.0.0.1:8080', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0}
- segmentId: not null
spans:
- operationName: /case/receiveContext-1
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 14
componentName: null
isError: false
spanType: Entry
peer: null
peerId: 0
tags:
- {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-1'}
- {key: http.method, value: GET}
refs:
- {parentEndpointId: 0, parentEndpoint: /okhttp-case/case/receiveContext-0, networkAddressId: 0, entryEndpointId: 0, refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '127.0.0.1:8080', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0}
- segmentId: not null
spans:
- operationName: /okhttp-case/case/receiveContext-0
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 12
componentName: null
isError: false
spanType: Exit
peer: 127.0.0.1:8080
peerId: 0
tags:
- {key: http.method, value: GET}
- {key: url, value: 'http://127.0.0.1:8080/okhttp-case/case/receiveContext-0'}
refs:
- {parentEndpointId: 0, parentEndpoint: /case/okhttp-case, networkAddressId: 0, entryEndpointId: 0, refType: CrossThread, parentSpanId: 1, parentTraceSegmentId: nq 0, parentServiceInstanceId: nq 0, networkAddress: '', entryEndpoint: /case/okhttp-case, entryServiceInstanceId: nq 0}

0 comments on commit f9f91fe

Please sign in to comment.