-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from scouter-contrib/development
Development
- Loading branch information
Showing
47 changed files
with
3,527 additions
and
946 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
addons: | ||
ssh_known_hosts: | ||
- demo.scouterapm.com | ||
dist: xenial | ||
language: node_js | ||
node_js: | ||
- "stable" | ||
before_install: | ||
- echo -e "Host $DEMO_SERVER_NODE\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | ||
- openssl aes-256-cbc -K $encrypted_d662ab6492f2_key -iv $encrypted_d662ab6492f2_iv -in .deploy.enc -out $DEMO_DELOY_FILE -d | ||
- chmod 600 $DEMO_DELOY_FILE | ||
- npm install | ||
script : | ||
- npm run-script build | ||
after_success: | ||
- tar cvf $SCOUTER_PAPER_COMPRESS_NAME build/ | ||
- echo "scp -i $DEMO_DELOY_FILE $SCOUTER_PAPER_COMPRESS_NAME $DEMO_SERVER_USER@$DEMO_SERVER_NODE:/home/$DEMO_SERVER_USER" | ||
- scp -i $DEMO_DELOY_FILE $SCOUTER_PAPER_COMPRESS_NAME $DEMO_SERVER_USER@$DEMO_SERVER_NODE:/home/$DEMO_SERVER_USER | ||
- ssh -i $DEMO_DELOY_FILE -T $DEMO_SERVER_USER@$DEMO_SERVER_NODE "/home/ec2-user/deploy.sh $SCOUTER_PAPER_COMPRESS_NAME" | ||
cache: | ||
directories: | ||
- "node_modules" | ||
branches: | ||
only: | ||
- development | ||
notifications: | ||
slack: scouterapm:fJndRYgbQA0uTLXiEqxZJhUU | ||
|
||
#: construction_worker: | ||
# job life cycle explain : https://docs.travis-ci.com/user/job-lifecycle/ | ||
# https://docs.travis-ci.com/user/encrypting-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PAPER_VERSION=2.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM nginx:1.17.0-alpine | ||
## url setting | ||
LABEL maintainer="yosong.heo@gmail.com" | ||
ARG INSTALL_URL=https://github.com/scouter-contrib/scouter-paper/releases/download/${PAPER_VERSION:-2.5.0}/scouter-paper-v${PAPER_VERSION:-2.5.0}.zip | ||
RUN mkdir -p /var/www; | ||
COPY default.conf /etc/nginx/conf.d/default.conf | ||
## install | ||
WORKDIR /var/www | ||
RUN apk add -U tzdata wget unzip;cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime; wget ${INSTALL_URL};unzip scouter-paper-v${PAPER_VERSION:-2.5.0}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## 1. 빌드 요구 사항 | ||
- docker version | ||
- Docker version 18.09.6 이상 | ||
### 1.2 빌드 | ||
- .env 파일에 Scouter Paper 릴리스 버전 변경 후 | ||
``` | ||
$./build.sh | ||
``` | ||
### 1.3 dockerhub 저장소에 Push | ||
|
||
``` | ||
$./push.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
source .env | ||
|
||
echo ">>> build paper version $PAPER_VERSION" | ||
export $PAPER_VERSION | ||
docker build -t scouterapm/scouter-paper:$PAPER_VERSION . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
charset utf-8; | ||
|
||
#charset koi8-r; | ||
#access_log /var/log/nginx/host.access.log main; | ||
|
||
location / { | ||
root /var/www; | ||
index index.html index.htm; | ||
} | ||
|
||
#error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
# | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
|
||
location ~* /\.(?!well-known\/) | ||
{ | ||
deny all; | ||
} | ||
|
||
# Prevent clients from accessing to backup/config/source files | ||
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ | ||
{ | ||
deny all; | ||
} | ||
|
||
#Prevent to log favicon.ico | ||
location = /favicon.ico | ||
{ | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
#Prevent to log robots.txt | ||
location = /robots.txt | ||
{ | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: '3.2' | ||
services: | ||
scouter-paper: | ||
image : scouterapm/scouter-paper:2.5.0 | ||
restart : always | ||
ports: | ||
- 8080:80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
source .env | ||
echo ">>> build paper version $PAPER_VERSION" | ||
docker push scouterapm/scouter-paper:$PAPER_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"-2608246922300427269" : { | ||
"name" : "/traceability/cross-service/complex<GET>\n(/sc-api-demo-m01.localdomain/sampleweb)", | ||
"error" : "", | ||
"xtype" : "WEB_SERVICE", | ||
"elapsed" : "485", | ||
"threadName" : "http-nio-8080-exec-5", | ||
"tag" : { | ||
"caller" : "-2608246922300427269", | ||
"ip": "172.31.31.84", | ||
"serverId" : "scouter-demo-collector" | ||
} | ||
}, | ||
"-1561743063494029368" : { | ||
"name" : "/traceability/cross-service/simple2<GET>\n(/sc-api-demo-m01.localdomain/sampleweb)", | ||
"error" : "", | ||
"xtype" : "WEB_SERVICE", | ||
"threadName" : "http-nio-8080-exec-5", | ||
"tag" : { | ||
"caller" : "-2608246922300427269", | ||
"ip": "172.31.31.84", | ||
"serverId" : "scouter-demo-collector" | ||
}, | ||
"childMap" : { | ||
"210230" : { | ||
"name" :"", | ||
"error" :"", | ||
"xtype" :"", | ||
"threadName" :"" | ||
}, | ||
"210231" : { | ||
"name" :"", | ||
"error" :"", | ||
"xtype" :"", | ||
"address":"", | ||
"threadName" :"", | ||
"tag" :{ | ||
"serverId" : "scouter-demo-collector" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "0.0.0.0", | ||
"parent": "null", | ||
"children": [ | ||
{ | ||
"name": "/traceability/cross-service/complex<GET>", | ||
"parent": "0.0.0.0", | ||
"children": [ | ||
{ | ||
"name": "/traceability/cross-service/simple2<GET>", | ||
"parent": "/traceability/cross-service/complex<GET>" | ||
}, | ||
{ | ||
"name": "/traceability/cross-service/simple<GET>", | ||
"parent": "/traceability/cross-service/complex<GET>" | ||
}, | ||
{ | ||
|
||
} | ||
] | ||
}, | ||
{ | ||
"name": "Level 2: B", | ||
"parent": "Top Level" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// XLogDataController.java | ||
// SingleXLogRequest | ||
GET http://demo.scouterapm.com:6188/scouter/v1/xlog-data/{yyyymmdd}/{txid} | ||
# | ||
### | ||
#"result": [ | ||
# { | ||
# "endTime": "1571082075636", | ||
# "objHash": "1026166527", | ||
# "service": "http:/traceability/cross-service/simple2", | ||
# "txid": "6990900342269582982", | ||
# "threadName": "", | ||
# "caller": "899870199175109144", | ||
# "gxid": "899870199175109144", | ||
# "elapsed": "578", | ||
# "error": "", | ||
# "cpu": "0", | ||
# "sqlCount": "0", | ||
# "sqlTime": "0", | ||
# "ipAddr": "0.0.0.0", | ||
# "allocatedMemory": "0", | ||
# "internalId": "0", | ||
# "userAgent": "", | ||
# "referrer": "", | ||
# "group": "", | ||
# "apicallCount": "0", | ||
# "apicallTime": "0", | ||
# "countryCode": "", | ||
# "city": "", | ||
# "login": "", | ||
# "desc": "", | ||
# "hasDump": "0", | ||
# "text1": "ip-172-31-21-206.ap-northeast-2.compute.internal:ScouterDemoWeb", | ||
# "text2": "", | ||
# "text3": "", | ||
# "text4": "", | ||
# "text5": "", | ||
# "queuingHost": "", | ||
# "queuingTime": "0", | ||
# "queuing2ndHost": "", | ||
# "queuing2ndTime": "0", | ||
# "xlogType": "ZIPKIN_SPAN" | ||
# }, | ||
GET http://demo.scouterapm.com:6188/scouter/v1/profile-data/20191017/6506185853545897725 | ||
### | ||
#"result": [ | ||
# { | ||
# "mainValue": "[driving thread] http-nio-8080-exec-21", | ||
# "additionalValueList": [], | ||
# "step": { | ||
# "parent": "-1", | ||
# "index": "0", | ||
# "start_time": "0", | ||
# "start_cpu": "0", | ||
# "spanPack": null, | ||
# "hash": "1712797862", | ||
# "time": "-1", | ||
# "value": "0", | ||
# "stepType": "9", | ||
# "order": "0", | ||
# "stepTypeName": "HASHED_MESSAGE" | ||
# } | ||
# }, | ||
|
||
GET http://demo.scouterapm.com:6188/scouter/v1/xlog/20191017/374225541302635030 | ||
|
||
### | ||
|
||
GET http://demo.scouterapm.com:6188/scouter/v1/xlog-data/20191017/-854231684852475423 | ||
|
||
### | ||
GET http://demo.scouterapm.com:6188/scouter/v1/dictionary/20191020?dictKeys=[table:566700965] | ||
|
||
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export default class ElementType { | ||
|
||
static defaultProps = { | ||
USER : "0", | ||
SERVICE : "1", | ||
API_CALL : "2", | ||
SQL : "3", | ||
DISPATCH : "4", | ||
THREAD : "5", | ||
|
||
toString(value) { | ||
switch(value){ | ||
case this.USER : return "USER"; | ||
case this.SERVICE : return "SERVICE"; | ||
case this.API_CALL : return "API_CALL"; | ||
case this.SQL : return "SQL"; | ||
case this.DISPATCH : return "DISPATCH"; | ||
case this.THREAD : return "THREAD"; | ||
default: | ||
return "UNKNOWN"; | ||
} | ||
} | ||
, | ||
toColor(value){ | ||
switch(value){ | ||
case this.USER : return "#aeaeae"; | ||
case this.SERVICE : return "#6e40aa"; | ||
case this.API_CALL : return "#417de0"; | ||
case this.SQL : return "#1ac7c2"; | ||
case this.DISPATCH : return "#c9510c"; | ||
case this.THREAD : return "#76b852"; | ||
default: | ||
return "#003666"; | ||
} | ||
} | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.