mirror of
https://github.com/wahyd4/docker-pinpoint.git
synced 2026-08-09 04:46:24 +10:00
Rebase
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
# docker-pinpoint
|
||||
|
||||
<!-- TOC -->
|
||||
This repo contains the docker images for [Pinpoint](https://github.com/naver/pinpoint), or you can just use the docker compose file run pinpoint in seconds.
|
||||
|
||||
- [docker-pinpoint](#docker-pinpoint)
|
||||
- [Build the images](#build-the-images)
|
||||
- [Run all the containers](#run-all-the-containers)
|
||||
- [Add your own Java based application to be monitored.](#add-your-own-java-based-application-to-be-monitored)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
This repo contains all the docker images for [Pinpoint](https://github.com/naver/pinpoint), or you can just use the docker compose file run pinpoint in seconds.
|
||||
|
||||
### Build the images
|
||||
### To build the images
|
||||
* Go to a folder
|
||||
* `docker build -t repo-name:latest .` to build the image
|
||||
|
||||
### Run all the containers
|
||||
### To run all containers
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
@@ -26,7 +17,7 @@ Open your browser and then go to <http://localhost:28080>
|
||||
|
||||
### Add your own Java based application to be monitored.
|
||||
|
||||
* Download the pinpoint agent tar file from <https://github.com/naver/pinpoint/releases/download/1.6.2/pinpoint-agent-1.6.2.tar.gz> and then modify the `pinpoint.config` if you need.
|
||||
* Modify the `pinpoint.config` if you need.
|
||||
|
||||
```
|
||||
###########################################################
|
||||
@@ -52,10 +43,9 @@ profiler.collector.tcp.port=9994
|
||||
* The following script is a example for a spring boot application.
|
||||
|
||||
```shell
|
||||
java -javaagent:/some-absolute-path/pinpoint-agent-1.6.2/pinpoint-bootstrap-1.6.2.jar -Dpinpoint.agentId=some-union-id -Dpinpoint.applicationName=some-name -jar build/libs/your-jar.jar
|
||||
java -javaagent:/some-absolute-path/pinpoint-agent-1.6.2/pinpoint-bootstrap-1.6.2.jar -Dpinpoint.agentId=some-union-id -Dpinpoint.applicationName=some-name -jar build/libs/wise-log-1.0.0-SNAPSHOT.jar
|
||||
|
||||
```
|
||||
|
||||
You can find more samples at: <https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples>
|
||||
|
||||
If you plan to use external volumes for hbase you should fill hbase first.
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@ version: '2'
|
||||
services:
|
||||
pinpoint-hbase:
|
||||
container_name: pinpoint-hbase
|
||||
image: wahyd4/pinpoint-hbase:1.6.2
|
||||
image: marcosamm/pinpoint-hbase:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "2181"
|
||||
@@ -35,7 +35,7 @@ services:
|
||||
depends_on:
|
||||
- pinpoint-hbase
|
||||
container_name: pinpoint-collector
|
||||
image: wahyd4/pinpoint-collector:1.6.2
|
||||
image: marcosamm/pinpoint-collector:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "9994"
|
||||
@@ -63,7 +63,7 @@ services:
|
||||
- pinpoint-hbase
|
||||
- pinpoint-mysql
|
||||
container_name: pinpoint-web
|
||||
image: wahyd4/pinpoint-web:1.6.2
|
||||
image: marcosamm/pinpoint-web:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
FROM marcosamm/pinpointagent-oraclejre:1.6.2-8u131
|
||||
|
||||
COPY app/joinfaces-example/ /opt/joinfaces-example
|
||||
COPY app/pinpoint/ /opt/pinpoint
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["java", "-javaagent:/opt/pinpoint/pinpoint-bootstrap.jar", "-Dpinpoint.agentId=dockerfile", "-Dpinpoint.applicationName=joinfaces-example", "-jar", "/opt/joinfaces-example/joinfaces-example-2.4.0-SNAPSHOT.jar"]
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,429 @@
|
||||
#
|
||||
# Pinpoint agent configuration
|
||||
#
|
||||
|
||||
###########################################################
|
||||
# Collector server #
|
||||
###########################################################
|
||||
profiler.collector.ip=192.168.0.18
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.span.ip=${profiler.collector.ip}
|
||||
profiler.collector.span.port=9996
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.stat.ip=${profiler.collector.ip}
|
||||
profiler.collector.stat.port=9995
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.tcp.ip=${profiler.collector.ip}
|
||||
profiler.collector.tcp.port=9994
|
||||
|
||||
|
||||
###########################################################
|
||||
# Profiler Global Configuration #
|
||||
###########################################################
|
||||
profiler.enable=true
|
||||
|
||||
profiler.jvm.collect.interval=1000
|
||||
|
||||
profiler.sampling.enable=true
|
||||
|
||||
# Set sampling rate. If you set it to 10, 1 out of 10 transaction will be sampled.
|
||||
profiler.sampling.rate=1
|
||||
|
||||
profiler.io.buffering.enable=true
|
||||
profiler.io.buffering.buffersize=20
|
||||
|
||||
profiler.spandatasender.write.queue.size=5120
|
||||
#profiler.spandatasender.socket.sendbuffersize=1048576
|
||||
#profiler.spandatasender.socket.timeout=3000
|
||||
profiler.spandatasender.chunk.size=16384
|
||||
profiler.spandatasender.socket.type=OIO
|
||||
|
||||
profiler.statdatasender.write.queue.size=5120
|
||||
#profiler.statdatasender.socket.sendbuffersize=1048576
|
||||
#profiler.statdatasender.socket.timeout=3000
|
||||
profiler.statdatasender.chunk.size=16384
|
||||
profiler.statdatasender.socket.type=OIO
|
||||
|
||||
profiler.agentInfo.send.retry.interval=300000
|
||||
|
||||
# Allows TCP data command
|
||||
profiler.tcpdatasender.command.accept.enable=true
|
||||
profiler.tcpdatasender.command.activethread.enable=true
|
||||
profiler.tcpdatasender.command.activethread.count.enable=true
|
||||
profiler.tcpdatasender.command.activethread.threaddump.enable=true
|
||||
profiler.tcpdatasender.command.activethread.threadlightdump.enable=true
|
||||
|
||||
# Trace Agent active thread info
|
||||
profiler.pinpoint.activethread=true
|
||||
|
||||
# Trace DataSource
|
||||
profiler.pinpoint.datasource=true
|
||||
|
||||
## Call Stack
|
||||
# Set max depth, if -1 is unlimited and min is 2.
|
||||
profiler.callstack.max.depth=64
|
||||
|
||||
# weather or not to propagate exceptions occurred at interceptor
|
||||
profiler.interceptor.exception.propagate=false
|
||||
|
||||
# Allow bytecode framework (JAVASSIST or ASM)
|
||||
profiler.instrument.engine=ASM
|
||||
|
||||
# bytecode dump option
|
||||
# java bytecode debug option
|
||||
bytecode.dump.enable=false
|
||||
#bytecode.dump.classlist=com.naver.user.UserService,com.pinpoint.debug.TestClass
|
||||
bytecode.dump.classlist=
|
||||
bytecode.dump.bytecode=false
|
||||
bytecode.dump.verify=false
|
||||
bytecode.dump.asm=false
|
||||
|
||||
###########################################################
|
||||
# application type #
|
||||
###########################################################
|
||||
#profiler.applicationservertype=TOMCAT
|
||||
#profiler.applicationservertype=BLOC
|
||||
|
||||
|
||||
###########################################################
|
||||
# user defined classes #
|
||||
###########################################################
|
||||
profiler.include=
|
||||
profiler.entrypoint=
|
||||
|
||||
###########################################################
|
||||
# TOMCAT #
|
||||
###########################################################
|
||||
profiler.tomcat.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.tomcat.bootstrap.main=org.apache.catalina.startup.Bootstrap
|
||||
# Check pre-conditions when registering class file transformers mainly due to JBoss plugin transforming the same class.
|
||||
# Setting this to true currently adds transformers only if the application was launched via org.apache.catalina.startup.Bootstrap,
|
||||
# or SpringBoot's launchers.
|
||||
# Set this to false to bypass this check entirely (such as when launching standalone applications running embedded Tomcat).
|
||||
profiler.tomcat.conditional.transform=false
|
||||
# Hide pinpoint headers.
|
||||
profiler.tomcat.hidepinpointheader=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.tomcat.excludeurl=/aa/test.html, /bb/exclude.html
|
||||
profiler.tomcat.tracerequestparam=true
|
||||
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.tomcat.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.tomcat.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.tomcat.realipemptyvalue}, Ignore header value.
|
||||
#profiler.tomcat.realipemptyvalue=unknown
|
||||
|
||||
|
||||
###########################################################
|
||||
# JETTY #
|
||||
###########################################################
|
||||
profiler.jetty.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.jetty.bootstrap.main=org.eclipse.jetty.start.Main
|
||||
# URLs to exclude from tracing
|
||||
profiler.jetty.excludeurl=
|
||||
|
||||
|
||||
###########################################################
|
||||
# DUBBO #
|
||||
###########################################################
|
||||
profiler.dubbo.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.dubbo.bootstrap.main=com.alibaba.dubbo.container.Main
|
||||
|
||||
|
||||
###########################################################
|
||||
# JBOSS #
|
||||
###########################################################
|
||||
profiler.jboss.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.jboss.bootstrap.main=org.jboss.modules.Main
|
||||
# Check pre-conditions when registering class file transformers mainly due to Tomcat plugin transforming the same class.
|
||||
# Setting this to true currently adds transformers only if the application was launched via org.jboss.modules.Main.
|
||||
# Set this to false to bypass this check entirely.
|
||||
profiler.jboss.conditional.transform=true
|
||||
# Hide pinpoint headers.
|
||||
profiler.jboss.hidepinpointheader=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.jboss.excludeurl=
|
||||
# HTTP Request methods to exclude from tracing
|
||||
#profiler.jboss.excludemethod=
|
||||
profiler.jboss.tracerequestparam=true
|
||||
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.jboss.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.jboss.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.jboss.realipemptyvalue}, Ignore header value.
|
||||
#profiler.jboss.realipemptyvalue=unknown
|
||||
|
||||
###########################################################
|
||||
# Vert.x(Reliability and stability can not be guaranteed) #
|
||||
###########################################################
|
||||
profiler.vertx.enable=false
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.vertx.bootstrap.main=io.vertx.core.Starter
|
||||
# Track Vertx.runOnContext() & Vertx.executeBlocking().
|
||||
# Sets the class name that implements io.vertx.core.Handler.
|
||||
# Improvement is in progress.
|
||||
profiler.vertx.handlers=
|
||||
|
||||
# HTTP server
|
||||
profiler.vertx.http.server.enable=false
|
||||
profiler.vertx.http.server.tracerequestparam=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.vertx.http.server.excludeurl=
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.vertx.http.server.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.vertx.http.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.vertx.http.server.realipemptyvalue}, Ignore header value.
|
||||
#profiler.vertx.http.server.realipemptyvalue=unknown
|
||||
# HTTP Request methods to exclude from tracing
|
||||
#profiler.vertx.http.server.excludemethod=
|
||||
|
||||
# HTTP client
|
||||
profiler.vertx.http.client.enable=false
|
||||
profiler.vertx.http.client.param=true
|
||||
profiler.vertx.http.client.cookie=true
|
||||
# When to dump cookies. Either ALWAYS or EXCEPTION.
|
||||
profiler.vertx.http.client.cookie.dumptype=ALWAYS
|
||||
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
|
||||
profiler.vertx.http.client.cookie.sampling.rate=1
|
||||
profiler.vertx.http.client.entity.statuscode=true
|
||||
|
||||
###########################################################
|
||||
# SPRING BOOT #
|
||||
###########################################################
|
||||
profiler.springboot.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.springboot.bootstrap.main=org.springframework.boot.loader.JarLauncher, org.springframework.boot.loader.WarLauncher, org.springframework.boot.loader.PropertiesLauncher
|
||||
|
||||
|
||||
###########################################################
|
||||
# JDBC #
|
||||
###########################################################
|
||||
profiler.jdbc=true
|
||||
profiler.jdbc.sqlcachesize=1024
|
||||
profiler.jdbc.maxsqlbindvaluesize=1024
|
||||
|
||||
#
|
||||
# MYSQL
|
||||
#
|
||||
profiler.jdbc.mysql=true
|
||||
profiler.jdbc.mysql.setautocommit=true
|
||||
profiler.jdbc.mysql.commit=true
|
||||
profiler.jdbc.mysql.rollback=true
|
||||
|
||||
#
|
||||
# MSSQL Jtds
|
||||
#
|
||||
profiler.jdbc.jtds=true
|
||||
profiler.jdbc.jtds.setautocommit=true
|
||||
profiler.jdbc.jtds.commit=true
|
||||
profiler.jdbc.jtds.rollback=true
|
||||
|
||||
#
|
||||
# Oracle
|
||||
#
|
||||
profiler.jdbc.oracle=true
|
||||
profiler.jdbc.oracle.setautocommit=true
|
||||
profiler.jdbc.oracle.commit=true
|
||||
profiler.jdbc.oracle.rollback=true
|
||||
|
||||
#
|
||||
# CUBRID
|
||||
#
|
||||
profiler.jdbc.cubrid=true
|
||||
profiler.jdbc.cubrid.setautocommit=true
|
||||
profiler.jdbc.cubrid.commit=true
|
||||
profiler.jdbc.cubrid.rollback=true
|
||||
|
||||
#
|
||||
# DBCP
|
||||
#
|
||||
profiler.jdbc.dbcp=true
|
||||
profiler.jdbc.dbcp.connectionclose=true
|
||||
|
||||
#
|
||||
# DBCP2
|
||||
#
|
||||
profiler.jdbc.dbcp2=true
|
||||
profiler.jdbc.dbcp2.connectionclose=true
|
||||
|
||||
#
|
||||
# HIKARICP
|
||||
#
|
||||
profiler.jdbc.hikaricp=true
|
||||
profiler.jdbc.hikaricp.connectionclose=true
|
||||
|
||||
###########################################################
|
||||
# Apache HTTP Client 4.x #
|
||||
###########################################################
|
||||
profiler.apache.httpclient4=true
|
||||
profiler.apache.httpclient4.cookie=true
|
||||
|
||||
# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient4.cookie.dumptype=ALWAYS
|
||||
profiler.apache.httpclient4.cookie.sampling.rate=1
|
||||
|
||||
# Dump entities of POST or PUT request. limited to entities which is HttpEtity.isRepeatable() == true.
|
||||
profiler.apache.httpclient4.entity=true
|
||||
|
||||
# When entities should be dumped. ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient4.entity.dumptype=ALWAYS
|
||||
profiler.apache.httpclient4.entity.sampling.rate=1
|
||||
|
||||
# Can profile status code value
|
||||
profiler.apache.httpclient4.entity.statuscode=true
|
||||
|
||||
# Not supported yet
|
||||
#profiler.apache.nio.httpclient4=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# JDK HTTPURLConnection #
|
||||
###########################################################
|
||||
profiler.jdk.httpurlconnection=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# Ning Async HTTP Client #
|
||||
###########################################################
|
||||
profiler.ning.asynchttpclient=true
|
||||
profiler.ning.asynchttpclient.cookie=true
|
||||
profiler.ning.asynchttpclient.cookie.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.cookie.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.cookie.sampling.rate=1
|
||||
profiler.ning.asynchttpclient.entity=true
|
||||
profiler.ning.asynchttpclient.entity.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.entity.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.entity.sampling.rate=1
|
||||
profiler.ning.asynchttpclient.param=true
|
||||
profiler.ning.asynchttpclient.param.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.param.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.param.sampling.rate=1
|
||||
|
||||
|
||||
###########################################################
|
||||
# LINE+ baseframework #
|
||||
###########################################################
|
||||
profiler.line.game.netty.param.dumpsize=512
|
||||
profiler.line.game.netty.entity.dumpsize=512
|
||||
|
||||
|
||||
###########################################################
|
||||
# Arcus #
|
||||
###########################################################
|
||||
profiler.arcus=true
|
||||
profiler.arcus.keytrace=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# Memcached #
|
||||
###########################################################
|
||||
profiler.memcached=true
|
||||
profiler.memcached.keytrace=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# ibatis #
|
||||
###########################################################
|
||||
profiler.orm.ibatis=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# mybatis #
|
||||
###########################################################
|
||||
profiler.orm.mybatis=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# spring-beans
|
||||
###########################################################
|
||||
# Profile spring-beans
|
||||
profiler.spring.beans=true
|
||||
|
||||
# filters
|
||||
# filter
|
||||
# filter OR filters
|
||||
# filter
|
||||
# value
|
||||
# value AND filter
|
||||
# value
|
||||
# token
|
||||
# token OR token
|
||||
# token
|
||||
# profiler.spring.beans.n.scope= [component-scan | post-processor] default is component-scan.
|
||||
# profiler.spring.beans.n.base-packages= [package name, ...]
|
||||
# profiler.spring.beans.n.name.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]
|
||||
# profiler.spring.beans.n.class.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]
|
||||
# profiler.spring.beans.n.annotation= [annotation name, ...]
|
||||
#
|
||||
# Scope:
|
||||
# component-scan: <context:component-scan ... /> or @ComponentScan
|
||||
# post-processor: BeanPostProcessor - Slow!!!
|
||||
#
|
||||
# ANT Style pattern rules:
|
||||
# ? - matches on character
|
||||
# * - matches zero or more characters
|
||||
# ** - matches zero or more 'directories' in a path
|
||||
|
||||
# Examples
|
||||
# profiler.spring.beans.1.scope=component-scan
|
||||
# profiler.spring.beans.1.base-packages=com.foo, com.bar
|
||||
# profiler.spring.beans.1.name.pattern=.*Foo, regex:.*Bar, antstyle:*Controller
|
||||
# profiler.spring.beans.1.class.pattern=
|
||||
# profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
|
||||
#
|
||||
# profiler.spring.beans.2.scope=post-processor
|
||||
# profiler.spring.beans.2.base-packages=com.foo
|
||||
# profiler.spring.beans.2.name.pattern=
|
||||
# profiler.spring.beans.2.class.pattern=antstyle:com.foo.repository.*Repository, antstyle:com.foo.Service.Main*
|
||||
# profiler.spring.beans.2.annotation=
|
||||
|
||||
profiler.spring.beans.1.scope=component-scan
|
||||
profiler.spring.beans.1.base-packages=
|
||||
profiler.spring.beans.1.name.pattern=
|
||||
profiler.spring.beans.1.class.pattern=
|
||||
profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
|
||||
|
||||
profiler.spring.beans.mark.error=false
|
||||
###########################################################
|
||||
# log4j
|
||||
###########################################################
|
||||
profiler.log4j.logging.transactioninfo=false
|
||||
|
||||
###########################################################
|
||||
# logback
|
||||
###########################################################
|
||||
profiler.logback.logging.transactioninfo=false
|
||||
|
||||
###########################################################
|
||||
# gson
|
||||
###########################################################
|
||||
profiler.json.gson=true
|
||||
|
||||
###########################################################
|
||||
# jackson
|
||||
###########################################################
|
||||
profiler.json.jackson=true
|
||||
|
||||
###########################################################
|
||||
# json-lib
|
||||
###########################################################
|
||||
profiler.json.jsonlib=true
|
||||
|
||||
###########################################################
|
||||
# cxf
|
||||
###########################################################
|
||||
profiler.cxf.client=true
|
||||
#profiler.cxf.client.hiddenParams=
|
||||
@@ -0,0 +1,24 @@
|
||||
# DESCRIPTION joinjaces-example + pinpoint-agent
|
||||
# TO_BUILD docker build -t joinfaces-exemple-with-pinpoint-agent .
|
||||
# TO_RUN docker run -it \
|
||||
# -e COLLECTOR_IP="198.162.0.18" \
|
||||
# -e PROFILER_APPLICATIONSERVERTYPE="TOMCAT" \
|
||||
# -e PROFILER_TOMCAT_CONDITIONAL_TRANSFORM="false" \
|
||||
# -e PROFILER_SAMPLING_RATE="1" \
|
||||
# -e PROFILER_JSON_JSONLIB="true" \
|
||||
# -e PROFILER_JSON_JACKSON="true" \
|
||||
# -e PROFILER_JSON_GSON="true" \
|
||||
# -v /home/marcosamm/.m2/repository:/root/.m2/repository \
|
||||
# joinfaces-exemple-with-pinpoint-agent \
|
||||
# /bin/sh -c "xvfb-run mvn -DwebDriverType=chrome install verify"
|
||||
|
||||
FROM marcosamm/pinpointagent-chrome-maven-oraclejdk:latest
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN wget https://github.com/marcosamm/joinfaces-example/archive/master.zip \
|
||||
&& unzip master.zip \
|
||||
&& mv joinfaces-example-master joinfaces-example \
|
||||
&& rm master.zip
|
||||
|
||||
WORKDIR /opt/joinfaces-example
|
||||
+2
-2
@@ -9,13 +9,13 @@ rancher-server:
|
||||
JAVA_OPTS: "-javaagent:/assets/pinpoint-agent/pinpoint-bootstrap-1.6.2.jar -Dpinpoint.agentId=app-in-docker -Dpinpoint.applicationName=app"
|
||||
|
||||
pinpoint-agent:
|
||||
image: wahyd4/pinpoint-agent:1.6.2
|
||||
image: marcosamm/pinpoint-agent:1.6.2
|
||||
net: "none"
|
||||
restart: unless-stopped
|
||||
# volumes:
|
||||
# - /var/container_data/pinpoint-agent/log:/opt/app/pinpoint-agent/log:rw
|
||||
environment:
|
||||
COLLECTOR_IP: 192.168.99.100
|
||||
COLLECTOR_IP: 192.168.0.18
|
||||
COLLECTOR_TCP_PORT: 9994
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
|
||||
@@ -23,3 +23,4 @@ RUN apk add --update curl bash \
|
||||
VOLUME ["/assets/pinpoint-agent"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
|
||||
CMD ["tail -f /dev/null"]
|
||||
|
||||
@@ -2,23 +2,57 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
COLLECTOR_IP=${COLLECTOR_IP:-127.0.0.1}
|
||||
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-9994}
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-9995}
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-9996}
|
||||
PINPOINT_AGENT_HOME=${PINPOINT_AGENT_HOME:-/opt/pinpoint-agent}
|
||||
|
||||
COLLECTOR_IP=${COLLECTOR_IP:-}
|
||||
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-}
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-}
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-}
|
||||
|
||||
PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE:-}
|
||||
|
||||
PROFILER_APPLICATIONSERVERTYPE=${PROFILER_APPLICATIONSERVERTYPE:-}
|
||||
PROFILER_TOMCAT_CONDITIONAL_TRANSFORM=${PROFILER_TOMCAT_CONDITIONAL_TRANSFORM:-}
|
||||
|
||||
PROFILER_JSON_GSON=${PROFILER_JSON_GSON:-}
|
||||
PROFILER_JSON_JACKSON=${PROFILER_JSON_JACKSON:-}
|
||||
PROFILER_JSON_JSONLIB=${PROFILER_JSON_JSONLIB:-}
|
||||
|
||||
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
|
||||
|
||||
cp -f /assets/pinpoint.config /assets/pinpoint-agent/pinpoint.config
|
||||
|
||||
sed -i "s/profiler.collector.ip=127.0.0.1/profiler.collector.ip=${COLLECTOR_IP}/g" /assets/pinpoint-agent/pinpoint.config
|
||||
|
||||
sed -i "s/profiler.collector.tcp.port=9994/profiler.collector.tcp.port=${COLLECTOR_TCP_PORT}/g" /assets/pinpoint-agent/pinpoint.config
|
||||
sed -i "s/profiler.collector.stat.port=9995/profiler.collector.stat.port=${COLLECTOR_UDP_STAT_LISTEN_PORT}/g" /assets/pinpoint-agent/pinpoint.config
|
||||
sed -i "s/profiler.collector.span.port=9996/profiler.collector.span.port=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/g" /assets/pinpoint-agent/pinpoint.config
|
||||
|
||||
if [ "$DISABLE_DEBUG" == "true" ]; then
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' /assets/pinpoint-agent/lib/log4j.xml
|
||||
if [ "$COLLECTOR_IP" != "" ]; then
|
||||
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_TCP_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_UDP_STAT_LISTEN_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_UDP_STAT_LISTEN_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_UDP_SPAN_LISTEN_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_SAMPLING_RATE" != "" ]; then
|
||||
sed -i "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_APPLICATIONSERVERTYPE" != "" ]; then
|
||||
sed -i "/#profiler.applicationservertype=/ s/=.*/=${PROFILER_APPLICATIONSERVERTYPE}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_TOMCAT_CONDITIONAL_TRANSFORM" != "" ]; then
|
||||
sed -i "/profiler.tomcat.conditional.transform=/ s/=.*/=${PROFILER_TOMCAT_CONDITIONAL_TRANSFORM}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_GSON" != "" ]; then
|
||||
sed -i "/profiler.json.gson=/ s/=.*/=${PROFILER_JSON_GSON}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_JACKSON" != "" ]; then
|
||||
sed -i "/profiler.json.jackson=/ s/=.*/=${PROFILER_JSON_JACKSON}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_JSONLIB" != "" ]; then
|
||||
sed -i "/profiler.json.jsonlib=/ s/=.*/=${PROFILER_JSON_JSONLIB}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
|
||||
exec tail -f /dev/null
|
||||
if [ "$DISABLE_DEBUG" == "true" ]; then
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' ${PINPOINT_AGENT_HOME}/lib/log4j.xml
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user