[#naver/pinpoint#6598] apply grpc

This commit is contained in:
Roy Kim 2020-03-17 17:30:13 +09:00 committed by Roy Kim
parent bbc9d86f72
commit 34cbc98aee
10 changed files with 57 additions and 44 deletions

17
.env
View File

@ -54,13 +54,15 @@ MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=true
MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=true
MAIL_PROPERTIES_MAIL_DEBUG=false
### Pinpoint-Collector
PINPOINT_COLLECTOR_NAME=pinpoint-collector
COLLECTOR_RECEIVER_BASE_PORT=9994
COLLECTOR_RECEIVER_STAT_UDP_PORT=9995
COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996
COLLECTOR_RECEIVER_AGENT_PORT=9991
COLLECTOR_RECEIVER_METADATA_PORT=9991
COLLECTOR_RECEIVER_STAT_PORT=9992
COLLECTOR_RECEIVER_SPAN_PORT=9993
FLINK_CLUSTER_ENABLE=true
FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1
@ -72,9 +74,12 @@ COLLECTOR_DEBUG_LEVEL=INFO
PINPOINT_AGENT_NAME=pinpoint-agent
COLLECTOR_IP=pinpoint-collector
COLLECTOR_TCP_PORT=9994
COLLECTOR_STAT_PORT=9995
COLLECTOR_SPAN_PORT=9996
PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992
PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
PROFILER_SAMPLING_RATE=1

View File

@ -126,15 +126,14 @@ services:
- pinpoint-hbase
restart: always
expose:
- "9994"
- "9995"
- "9996"
- "9991"
- "9992"
- "9993"
ports:
- "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
- "${COLLECTOR_RECEIVER_AGENT_PORT:-9991}:9991/udp"
- "${COLLECTOR_RECEIVER_METADATA_PORT:-9991}:9991/tcp"
- "${COLLECTOR_RECEIVER_STAT_PORT:-9992}:9992/udp"
- "${COLLECTOR_RECEIVER_SPAN_PORT:-9993}:9993/udp"
networks:
- pinpoint
environment:
@ -184,9 +183,10 @@ services:
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- COLLECTOR_IP=${COLLECTOR_IP}
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
- PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}
- PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}
- PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}
- PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
depends_on:

View File

@ -4,11 +4,14 @@ SPRING_PROFILES=release
### Pinpoint-Agent
PINPOINT_AGENT_NAME=pinpoint-agent
#collector information required
COLLECTOR_IP=
COLLECTOR_TCP_PORT=9994
COLLECTOR_STAT_PORT=9995
COLLECTOR_SPAN_PORT=9996
PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992
PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
PROFILER_SAMPLING_RATE=1

View File

@ -2,10 +2,12 @@
set -e
set -x
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_STAT_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_SPAN_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/profiles/${SPRING_PROFILES}/pinpoint-env.config
sed -i "/profiler.transport.grpc.agent.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.metadata.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.stat.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.span.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" /pinpoint-agent/profiles/${SPRING_PROFILES}/pinpoint-env.config
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /pinpoint-agent/profiles/${SPRING_PROFILES}/log4j.xml

View File

@ -19,9 +19,10 @@ services:
environment:
- SPRING_PROFILES=${SPRING_PROFILES}
- COLLECTOR_IP=${COLLECTOR_IP}
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
- PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}
- PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}
- PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}
- PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
networks:

View File

@ -13,9 +13,10 @@ HBASE_PORT=
PINPOINT_COLLECTOR_NAME=pinpoint-collector
COLLECTOR_RECEIVER_BASE_PORT=9994
COLLECTOR_RECEIVER_STAT_UDP_PORT=9995
COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996
COLLECTOR_RECEIVER_AGENT_PORT=9991
COLLECTOR_RECEIVER_METADATA_PORT=9991
COLLECTOR_RECEIVER_STAT_PORT=9992
COLLECTOR_RECEIVER_SPAN_PORT=9993
FLINK_CLUSTER_ENABLE=true
FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1

View File

@ -13,4 +13,3 @@ sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/RO
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/profiles/${SPRING_PROFILES}/log4j.xml
exec /usr/local/tomcat/bin/catalina.sh run
profiles/${SPRING_PROFILES}/

View File

@ -13,15 +13,14 @@ services:
restart: always
expose:
- "9994"
- "9995"
- "9996"
- "9991"
- "9992"
- "9993"
ports:
- "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
- "${COLLECTOR_RECEIVER_AGENT_PORT:-9991}:9991/udp"
- "${COLLECTOR_RECEIVER_METADATA_PORT:-9991}:9991/tcp"
- "${COLLECTOR_RECEIVER_STAT_PORT:-9992}:9992/udp"
- "${COLLECTOR_RECEIVER_SPAN_PORT:-9993}:9993/udp"
environment:
- SPRING_PROFILES=${SPRING_PROFILES}

View File

@ -2,7 +2,7 @@ FROM java:8-jdk
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.0}
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.1}
ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase

View File

@ -4,11 +4,14 @@ SPRING_PROFILES=release
### Pinpoint-Agent
PINPOINT_AGENT_NAME=pinpoint-agent
#collector information required
COLLECTOR_IP=
COLLECTOR_TCP_PORT=9994
COLLECTOR_STAT_PORT=9995
COLLECTOR_SPAN_PORT=9996
PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=9991
PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=9992
PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=9993
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
PROFILER_SAMPLING_RATE=1