centos搭建pinpoint及自己踩到的坑

CentOS安装PinPoint,并配置tomcat和springboot应用

1、软件准备

jdk-8u191-linux-x64.tar.gz,下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

hbase-1.2.6.1-bin.tar.gz,下载地址:http://archive.apache.org/dist/hbase/

apache-tomcat-9.0.24.tar.gz,下载地址:https://tomcat.apache.org/download-90.cgi

pinpoint,下载地址:https://github.com/naver/pinpoint/releases

建表脚本,下载地址: https://github.com/naver/pinpoint/tree/master/hbase/scripts

​ pinpoint-collector-1.8.4.war #收集器

​ pinpoint-web-1.8.4.war #界面展现

​ pinpoint-agent-1.8.4.tar.gz #探针

​ hbase-create.hbase #表创建脚本

img

注意hbase版本,经测试其他版本会出现莫名其妙的问题。pinpoint-1.8.x用到的hbase客户端为hbase-shaded-client-1.2.6.1.jar,所以Hbase也选择用1.2.6.1版本

2、安装JDK

查看:CentOS安装JDK-tar.gz文件

3、安装hbase

参考:CentOS下安装Hbase,虽然版本不一样,但安装方式和端口一样

$sudo cd /usr/local                                                   #进入/usr/local目录
$sudo tar -zxvf /var/ftp/pub/hbase-1.2.6.1-bin.tar.gz                 #解压安装文件
$sudo ./hbase-1.2.6.1/bin/start-hbase.sh                              #启动hbase
$sudo ./hbase-1.2.6.1/bin/hbase shell /var/ftp/pub/hbase-create.hbase #创建pinpoint表

脚本执行完成后可查看导入的表:

img

4、安装pinpoint

tomcat安装参考:CentOS7下安装Tomcat

pinpoint-collector和pinpoint-web需要部署在tomcat容器,且必须放在ROOT目录下。本文将pinpoint-collector和pinpoint-web部署在同一台机器上,需要2个tomcat,为防止端口冲突,我们将默认端口(8005、8080、8009)分别改为(1005、1080、1009)和(2005、2080、2009)。

  • 4.1、安装pinpoint-collector
$sudo cd /usr/local/ #进入安装目录
$sudo tar -zxvf /var/ftp/pub/apache-tomcat-9.0.24.tar.gz #解压tomcat
$sudo mv apache-tomcat-9.0.24/ apache-tomcat-1080/ #重命名目录
$sudo cd apache-tomcat-1080/webapps/
$sudo rm -rf * #删除所有默认应用
$sudo unzip /var/ftp/pub/pinpoint-collector-1.8.4.war -d ROOT #解压pinpoint-collector到$TOMCAT_HOME/webapps/ROOT目录

修改$TOMCAT_HOME/conf/server.xml文件,将8005、8080、8009端口分别改为1005、1080、1009

$sudo cd /usr/local/apache-tomcat-1080/bin
$sudo ./startup.sh #启动tomcat容器
  • 4.2、安装pinpoint-web
$sudo cd /usr/local/ #进入安装目录
$sudo tar -zxvf /var/ftp/pub/apache-tomcat-9.0.24.tar.gz #解压tomcat
$sudo mv apache-tomcat-9.0.24/ apache-tomcat-2080/ #重命名目录
$sudo cd apache-tomcat-2080/webapps/
$sudo rm -rf * #删除所有默认应用
$sudo unzip /var/ftp/pub/pinpoint-web-1.8.4.war -d ROOT #解压pinpoint-web到$TOMCAT_HOME/webapps/ROOT目录

修改$TOMCAT_HOME/conf/server.xml文件,将8005、8080、8009端口分别改为2005、2080、2009

$sudo cd /usr/local/apache-tomcat-2080/bin
$sudo ./startup.sh #启动tomcat容器
  • 4.3、部署pinpoint-agent

先解压pinpoint-agent到任意目录,本文解压到/home/agent目录

$sudo cd /home #进入安装目录
$sudo mkdir agent #创建文件夹
$sudo cd agent #进入安装文件夹
$sudo tar -zxvf /var/ftp/pub/pinpoint-agent-1.8.4.tar.gz #解压pinpoint-agent文件
  • 4.3.1、pinpoint-agent配置和参数

pinpoint-agent的配置文件为$PINTPOINT_AGENT_HOME/pinpoint.config,除profiler.collector.ip参数,其他参数可保持不变。

profiler.collector.ip=127.0.0.1 #后面的ip地址为pinpoint-collector安装地址

参数说明:

-javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar #pinpoint-agent安装地址
-Dpinpoint.agentId=test-01 #应用ID,全局唯一
-Dpinpoint.applicationName=test #应用名
  • 4.3.2、tomcat环境配置
  1. Linux环境

在$TOMCAT_HOME/bin/目录新增setenv.sh文件(注意.sh文件头以“#!/bin/sh”为第一行),添加配置:

#!/bin/sh

CATALINA_OPTS="$CATALINA_OPTS -javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test"

img

  1. Windows环境

    在$TOMCAT_HOME/bin/目录新增setenv.bat文件,添加配置:

set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:E:/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test

img

如果日志中输出以下信息,则表示配置成功:

img

  • 4.3.3、springboot环境配置

只需在java命令后面加上-javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=xxx -Dpinpoint.applicationName=xxx参数,如:

java -javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test -jar test.jar

例子

java -javaagent:/opt/pinpoint-agent-1.8.4/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=gateway -Dspring.profiles.active=dev  -jar gateway.jar
  • 4.4、访问pinpoint-web

打开安装地址:http://192.168.1.26:2080/ 可查看pinpoint收集情况

img

遇到的问题
  • 1.pinpoint web访问慢

pinpoint web部署完成后,在浏览器输入地址访问,pinpoint 界面打开耗时较长甚至有时打不开,打开浏览器的开发模式控制台,可看到如下的错误:

1. [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjx4wXg.woff2
2. [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjxAwXjeu.woff2

出现这个问题的原因是首页引入了Google字体库,而通常谷歌是被屏蔽的,特别是在内部服务器部署的项目一般都是不能访问外网的。

解决办法:


打开首页文件pinpoint-web-1.6.2/webapps/ROOT/index.html,注释以下代码:

<!--<link href='//fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>-->

并在该文件添加以下代码,引入后续要新建的css文件:

<link href='lib/css/google.css' rel='stylesheet' type='text/css'>

保存修改并退出,那现在我们需要在 pinpoint-web-1.6.2/webapps/ROOT/lib/css 目录下新建google.css文件。
google.css文件内容,如下:

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(../fonts/S6uyw4BMUTPHjxAwXjeu.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(../fonts/S6uyw4BMUTPHjx4wXg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}12345678910111213141516

从google.css文件内容可看到引入了../fonts/目录下(也就是pinpoint-web-1.6.2/webapps/ROOT/lib/fonts/目录)的两个字体文件S6uyw4BMUTPHjxAwXjeu.woff2S6uyw4BMUTPHjx4wXg.woff2
如何下载该字体文件呢?
若你可以访问到www.google.com,则步骤如下:

  1. 浏览器输入http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjxAwXjeu.woff2即可下载v14/S6uyw4BMUTPHjxAwXjeu.woff2文件。
  2. 浏览器输入http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjx4wXg.woff2即可下载S6uyw4BMUTPHjx4wXg.woff2文件。

若你不可以访问google的话,可去这里下载:https://download.csdn.net/download/huixueyi/10593460https://download.csdn.net/download/huixueyi/10593470
现在将这两文件上传到pinpoint-web-1.6.2/webapps/ROOT/lib/fonts/ 下面。
最后,重启pinpoint-web即可,再次访问web界面就会发现无报错并且加载快了许多。

不能显示完整的链路追踪,只能显示到网关层面

部署了两个服务,一个gateway网关,一个uploads,默认配置只能访问到网关层面,不能看到下游的链路
需要改pinpoint-agent的pinpoint.config,由于官网也没找到详细的配置说明,我就把大部分开关打开了,也是有效的,如果有大兄弟有详细的配置说明可以请教下

贴一下自己的配置:

#
# Pinpoint agent configuration
#

###########################################################
# Collector server                                        # 
###########################################################
profiler.collector.ip=127.0.0.1

# 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

# Application namespace
# Differentiate from external pinpoint agents. (e.g., com.pinpoint)
profiler.application.namespace=

profiler.interceptorregistry.size=8192

# Manually override jvm vendor name (Oracle, IBM, OpenJDK, etc)
# You probably won't ever need to set this value.
profiler.jvm.vendor.name=

# Interval (in milliseconds) at which agent stat data is collected. (default : 5000, min : 1000, max : 5000)
profiler.jvm.stat.collect.interval=5000
# Number of agent stat data sent to the collector in a single batch. (default : 6)
profiler.jvm.stat.batch.send.count=6

# Allow to add detailed collector's metrics
profiler.jvm.stat.collect.detailed.metrics=true

# Allow sampling.
profiler.sampling.enable=true

# 1 out of n transactions will be sampled where n is the rate. (20: 5%)
profiler.sampling.rate=1

# Allow buffering when flushing span to IO.
profiler.io.buffering.enable=true

# How many spans to store if buffering enabled.
profiler.io.buffering.buffersize=20

###########################################################
# Base Tcp Sender                                        #
###########################################################
# Allow 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

profiler.tcpdatasender.client.write.timeout=3000
profiler.tcpdatasender.client.request.timeout=3000
profiler.tcpdatasender.client.reconnect.interval=3000
profiler.tcpdatasender.client.ping.interval=300000
profiler.tcpdatasender.client.handshake.interval=60000

profiler.tcpdatasender.client.write.buffer.highwatermark=32m
profiler.tcpdatasender.client.write.buffer.lowwatermark=16m

# Interval to retry sending agent info. Unit is milliseconds.
profiler.agentInfo.send.retry.interval=300000


###########################################################
# Stat Data Sender                                        #
###########################################################
# Should keep in mind
# 1. Loadbancing : TCP transport load balancing is per connection.(UDP transport loadbalancing is per packet)
# 2. In unexpected situations, UDP has its own protection feature (like packet loss etc.), but tcp does not have such a feature. (We will add protection later)
profiler.statdatasender.transport.type=UDP

# These settings are active only when using UDP.
# Capacity of the StatDataSender write queue.
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

# These settings are active only when using TCP.
profiler.statdatasender.write.buffer.highwatermark=16m
profiler.statdatasender.write.buffer.lowwatermark=8m


###########################################################
# Span Data Sender                                        #
###########################################################
# Should keep in mind
# 1. Loadbancing : TCP transport load balancing is per connection.(UDP transport loadbalancing is per packet)
# 2. In unexpected situations, UDP has its own protection feature (like packet loss etc.), but tcp does not have such a feature. (We will add protection later)
profiler.spandatasender.transport.type=UDP

# These settings are active only when using UDP.
# Capacity of the SpanDataSender write queue.
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

# These settings are active only when using TCP.
profiler.spandatasender.write.buffer.highwatermark=16m
profiler.spandatasender.write.buffer.lowwatermark=8m


# Trace Agent active thread info.
profiler.pinpoint.activethread=true

# Trace DataSource
profiler.pinpoint.datasource=true

# Deadlock Monitor
profiler.monitor.deadlock.enable=true
profiler.monitor.deadlock.interval=60000

## 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 (ASM only)
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

# Matcher
profiler.instrument.matcher.enable=true
# Matcher cache. max size is 64.
profiler.instrument.matcher.interface.cache.size=4
profiler.instrument.matcher.interface.cache.entry.size=16
profiler.instrument.matcher.annotation.cache.size=4
profiler.instrument.matcher.annotation.cache.entry.size=4
profiler.instrument.matcher.super.cache.size=4
profiler.instrument.matcher.super.cache.entry.size=4

# Lambda expressions.
profiler.lambda.expressions.support=true

# Proxy HTTP headers.
# Please see (https://github.com/naver/pinpoint/blob/master/doc/proxy-http-header.md) for more information.
profiler.proxy.http.header.enable=true

# HTTP status code with request failure.
# 1xx, 2xx, 3xx, 4xx, 5xx, 100, 101, 200, 201, ... 501, 502, 503, 504, 505
# e.g. profiler.http.status.code.errors=5xx, 401, 403
profiler.http.status.code.errors=5xx

###########################################################
# application type                                        # 
###########################################################
#profiler.applicationservertype=TOMCAT
#profiler.applicationservertype=BLOC

###########################################################
# application type detect order                           # 
###########################################################
profiler.type.detect.order=

profiler.plugin.disable=

###########################################################
# user defined classes                                    # 
###########################################################
# Specify classes and methods you want to profile here.

# Needs to be a comma separated list of fully qualified class names, or fully qualified package names with wild card class.
profiler.include=
# Ex: foo.bar.MyClass, foo.baz.*

# Needs to be a comma separated list of fully qualified method names. Wild card not supported.
profiler.entrypoint=
# Ex: foo.bar.MyClass.myMethod, foo.bar.MyClass.anotherMethod

# Message queue listener invoker methods.
# This is usually for when a separate implementation or a framework provides a separate handler for invoking callbacks
# when consuming messages.
# Comma-separated list of fully qualified method names with a Message argument.
profiler.message.queue.client.handler.methods=org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener,org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener

###########################################################
# 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=true
# Hide pinpoint headers.
profiler.tomcat.hidepinpointheader=true
# URLs to exclude from tracing.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
profiler.tomcat.excludeurl=/aa/test.html, /bb/exclude.html
profiler.tomcat.tracerequestparam=true
# HTTP Request methods to exclude from tracing
#profiler.tomcat.excludemethod=POST,PUT

# 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.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
profiler.jetty.excludeurl=
# HTTP Request methods to exclude from tracing
#profiler.jetty.excludemethod=
# Hide pinpoint headers.
profiler.jetty.hide-pinpoint-header=true
profiler.jetty.tracerequestparam=true

# original IP address header
# https://en.wikipedia.org/wiki/X-Forwarded-For
#profiler.jetty.realipheader=X-Forwarded-For
# nginx real ip header
#profiler.jetty.realipheader=X-Real-IP
# optional parameter, If the header value is ${profiler.jetty.realipemptyvalue}, Ignore header value.
#profiler.jetty.realipemptyvalue=unknown

###########################################################
# 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.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
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

###########################################################
# Resin
###########################################################
# default enable resin plugin
profiler.resin.enable=true
# if empty , default value is : com.caucho.server.resin.Resin
profiler.resin.bootstrap.main=
# trace param in request  ,default value is true
profiler.resin.tracerequestparam=true
# URLs to exclude from tracing.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
profiler.resin.excludeurl=
# Hide pinpoint headers.
profiler.resin.hidepinpointheader=true
# HTTP Request methods to exclude from tracing
#profiler.resin.excludemethod=

# original IP address header
# https://en.wikipedia.org/wiki/X-Forwarded-For
#profiler.resin.realipheader=X-Forwarded-For
# nginx real ip header
#profiler.resin.realipheader=X-Real-IP
# optional parameter, If the header value is ${profiler.resin.realipemptyvalue}, Ignore header value.
#profiler.resin.realipemptyvalue=unknown


###########################################################
# Weblogic
###########################################################
profiler.weblogic.enable=true
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
profiler.weblogic.bootstrap.main=weblogic.Server
# trace param in request  ,default value is true
profiler.weblogic.tracerequestparam=true
# URLs to exclude from tracing.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
profiler.weblogic.excludeurl=
# HTTP Request methods to exclude from tracing
#profiler.weblogic.excludemethod=

# original IP address header
# https://en.wikipedia.org/wiki/X-Forwarded-For
#profiler.weblogic.realipheader=X-Forwarded-For
# nginx real ip header
#profiler.weblogic.realipheader=X-Real-IP
# optional parameter, If the header value is ${profiler.weblogic.realipemptyvalue}, Ignore header value.
#profiler.weblogic.realipemptyvalue=unknown

###########################################################
# Vert.x(Reliability and stability can not be guaranteed) #
###########################################################
profiler.vertx.enable=true
# 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 base packages that implements io.vertx.core.Handler.
profiler.vertx.handler.base-packages=
# e.g. com.service.handler, com.server.http.handler

# HTTP server
profiler.vertx.http.server.enable=true
# Set HttpServerRequestHandler method name. The argument is io.vertx.core.http.HttpServerRequest.
profiler.vertx.http.server.request-handler.method.name=io.vertx.ext.web.impl.RouterImpl.accept
profiler.vertx.http.server.tracerequestparam=true
profiler.vertx.http.server.hidepinpointheader=true
# URLs to exclude from tracing.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
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=true
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


###########################################################
# Undertow
###########################################################
profiler.undertow.enable=true
# Servlet deployment support(e.g. Spring Boot Undertow, Wildfly)
# If it is bootstrapped Undertow, set it to false.
profiler.undertow.deploy.servlet=true
# trace param in request  ,default value is true
profiler.undertow.tracerequestparam=true
# Hide pinpoint headers.
profiler.undertow.hidepinpointheader=true
# URLs to exclude from tracing.
# Support ant style pattern. e.g. /aa/*.html, /??/exclude.html
profiler.undertow.excludeurl=
# HTTP Request methods to exclude from tracing
#profiler.undertow.excludemethod=

# original IP address header
# https://en.wikipedia.org/wiki/X-Forwarded-For
#profiler.undertow.realipheader=X-Forwarded-For
# nginx real ip header
#profiler.undertow.realipheader=X-Real-IP
# optional parameter, If the header value is ${profiler.undertow.realipemptyvalue}, Ignore header value.
#profiler.undertow.realipemptyvalue=unknown

###########################################################
# 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

###########################################################
# JSP                                                     #
###########################################################
profiler.jsp.enable=true

###########################################################
# JDBC                                                    # 
###########################################################
# Profile JDBC drivers.
profiler.jdbc=true
# Size of cache. Fixed maximum.
profiler.jdbc.sqlcachesize=1024
# trace bindvalues for PreparedStatements
profiler.jdbc.tracesqlbindvalue=true
# Maximum bindvalue size.
profiler.jdbc.maxsqlbindvaluesize=1024

#
# MYSQL
#
# Profile MySQL.
profiler.jdbc.mysql=true
# Allow profiling of setautocommit.
profiler.jdbc.mysql.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.mysql.commit=true
# Allow profiling of rollback.
profiler.jdbc.mysql.rollback=true
# Trace bindvalues for MySQL PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.jdbc.mysql.tracesqlbindvalue=true

#
# MARIADB
#
# Profile MariaDB
profiler.jdbc.mariadb=true
# Allow profiling of setautocommit.
profiler.jdbc.mariadb.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.mariadb.commit=true
# Allow profiling of rollback.
profiler.jdbc.mariadb.rollback=true
# Trace bindvalues for MariaDB PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.jdbc.mariadb.tracesqlbindvalue=true

#
# MSSQL Jtds
#
# Profile jTDS.
profiler.jdbc.jtds=true
# Allow profiling of setautocommit.
profiler.jdbc.jtds.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.jtds.commit=true
# Allow profiling of rollback.
profiler.jdbc.jtds.rollback=true
# Trace bindvalues for jTDS PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.jdbc.jtds.tracesqlbindvalue=true

#
# Oracle
#
# Profile Oracle DB.
profiler.jdbc.oracle=true
# Allow profiling of setautocommit.
profiler.jdbc.oracle.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.oracle.commit=true
# Allow profiling of rollback.
profiler.jdbc.oracle.rollback=true
# Trace bindvalues for Oracle PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.jdbc.oracle.tracesqlbindvalue=true

#
# CUBRID
#
# Profile CUBRID.
profiler.jdbc.cubrid=true
# Allow profiling of setautocommit.
profiler.jdbc.cubrid.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.cubrid.commit=true
# Allow profiling of rollback.
profiler.jdbc.cubrid.rollback=true
# Trace bindvalues for CUBRID PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.jdbc.cubrid.tracesqlbindvalue=true

#
# DBCP
#
# Profile DBCP.
profiler.jdbc.dbcp=true
profiler.jdbc.dbcp.connectionclose=true

#
# DBCP2
#
# Profile DBCP2.
profiler.jdbc.dbcp2=true
profiler.jdbc.dbcp2.connectionclose=true

#
# HIKARICP
#
profiler.jdbc.hikaricp=true
profiler.jdbc.hikaricp.connectionclose=true

#
# DRUID
#
profiler.jdbc.druid=true
profiler.jdbc.druid.connectionclose=true

#
# CASSANDRA
#
# Profile CASSANDRA.
profiler.cassandra=true
# Trace bindvalues for CASSANDRA PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
#profiler.cassandra.tracecqlbindvalue=true

#
# PostgreSQL
#
# Profile PostgreSQL.
profiler.jdbc.postgresql=true
# Allow profiling of setautocommit.
profiler.jdbc.postgresql.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.postgresql.commit=true
# Allow profiling of rollback.
profiler.jdbc.postgresql.rollback=true

###########################################################
# MONGODB
###########################################################
profiler.mongo=true
profiler.mongo.collectjson=true
profiler.mongo.tracebsonbindvalue=true

###########################################################
# Apache HTTP Client  3.x                                 #
###########################################################
# Record Parameter.
profiler.apache.httpclient3.param=true

# Record Cookies.
profiler.apache.httpclient3.cookie=true

# When to dump cookies. Either ALWAYS or EXCEPTION.
profiler.apache.httpclient3.cookie.dumptype=ALWAYS
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
profiler.apache.httpclient3.cookie.sampling.rate=1

# Dump entities of POST and PUT requests. Limited to entities where HttpEntity.isRepeatable() == true.
profiler.apache.httpclient3.entity=true

# When to dump entities. Either ALWAYS or EXCEPTION.
profiler.apache.httpclient3.entity.dumptype=ALWAYS
# 1 out of n entities will be sampled where n is the rate. (10: 10%)
profiler.apache.httpclient3.entity.sampling.rate=1

# Record IO time.
profiler.apache.httpclient3.io=true

###########################################################
# Apache HTTP Client  4.x                                 #
###########################################################
# Record Parameter.
profiler.apache.httpclient4.param=true

# Record cookies.
profiler.apache.httpclient4.cookie=true

# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
profiler.apache.httpclient4.cookie.dumptype=ALWAYS

# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
profiler.apache.httpclient4.cookie.sampling.rate=1

# Dump entities of POST and PUT requests. Limited to entities where HttpEntity.isRepeatable() == true.
profiler.apache.httpclient4.entity=true

# When to dump entities. Either ALWAYS or EXCEPTION.
profiler.apache.httpclient4.entity.dumptype=ALWAYS

# 1 out of n entities will be sampled where n is the rate. (10: 10%)
profiler.apache.httpclient4.entity.sampling.rate=1

# Allow profiling status code value.
profiler.apache.httpclient4.entity.statuscode=true

# Record IO time.
profiler.apache.httpclient4.io=true

# Not supported yet.
#profiler.apache.nio.httpclient4=true

###########################################################
# JDK HTTPURLConnection                                   #
###########################################################
# Profile parameter.
profiler.jdk.http.param=true

###########################################################
# Ning Async HTTP Client                                  # 
###########################################################
# Profile Ning Async HTTP Client.
profiler.ning.asynchttpclient=true

# Record parameters. (unsupported in 1.8.x, 1.9.x versions)
profiler.ning.asynchttpclient.param=true

# Record cookies.
profiler.ning.asynchttpclient.cookie=true
# When to dump cookies. Either ALWAYS or EXCEPTION.
profiler.ning.asynchttpclient.cookie.dumptype=ALWAYS
# Cookie dump size.
profiler.ning.asynchttpclient.cookie.dumpsize=1024
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
profiler.ning.asynchttpclient.cookie.sampling.rate=1

# Record Entities.
profiler.ning.asynchttpclient.entity=true
# When to dump entities. Either ALWAYS or EXCEPTION.
profiler.ning.asynchttpclient.entity.dumptype=ALWAYS
# Entity dump size.
profiler.ning.asynchttpclient.entity.dumpsize=1024
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
profiler.ning.asynchttpclient.entity.sampling.rate=1

###########################################################
# Arcus                                                   # 
###########################################################
# Profile Arcus.
profiler.arcus=true
profiler.arcus.async=true
# Record keytrace.
profiler.arcus.keytrace=true

###########################################################
# Memcached                                               # 
###########################################################
# Profile Memecached.
profiler.memcached=true
profiler.memcached.async=true
# Record keytrace
profiler.memcached.keytrace=true

###########################################################
# Thrift                                                  # 
###########################################################
# Profile Thrift
profiler.thrift.client=true
profiler.thrift.client.async=true
# Profile processor.
profiler.thrift.processor=true
profiler.thrift.processor.async=true
# Allow recording arguments.
profiler.thrift.service.args=true
# Allow recording result.
profiler.thrift.service.result=true


###########################################################
# ibatis                                                  # 
###########################################################
# Profile ibatis.
profiler.orm.ibatis=true

###########################################################
# mybatis                                                 # 
###########################################################
# Profile 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

###########################################################
# spring @Async
###########################################################
profiler.spring.async.enable=true
# Add custom AsyncTaskExecutor classes. Comma separated list of fully qualified class names. Wildcard not supported.
# Default values
#     org.springframework.scheduling.concurrent.ConcurrentTaskExecutor
#     org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
#     org.springframework.core.task.SimpleAsyncTaskExecutor
#     org.springframework.scheduling.quartz.SimpleThreadPoolTaskExecutor
#     org.springframework.core.task.support.TaskExecutorAdapter
#     org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
#     org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
#     org.springframework.jca.work.WorkManagerTaskExecutor
#     org.springframework.scheduling.commonj.WorkManagerTaskExecutor
profiler.spring.async.executor.class.names=

###########################################################
# log4j (guide url : https://github.com/naver/pinpoint/blob/master/doc/per-request_feature_guide.md)
###########################################################
profiler.log4j.logging.transactioninfo=false

###########################################################
# logback (guide url : https://github.com/naver/pinpoint/blob/master/doc/per-request_feature_guide.md)
###########################################################
profiler.logback.logging.transactioninfo=false

###########################################################
# google httpclient 
###########################################################
# Profile async.
profiler.google.httpclient.async=true

###########################################################
# redis 
###########################################################
# Jedis client
profiler.redis.jedis.enable=true
profiler.redis.jedis.pipeline=true
profiler.redis.jedis.io=true

// Lettuce client
profiler.redis.lettuce.enable=true

###########################################################
# OkHttp
###########################################################
profiler.okhttp.enable=true
# Record param.
profiler.okhttp.param=true

# Record Cookies.
profiler.okhttp.cookie=false
# When to dump cookies. Either ALWAYS or EXCEPTION.
profiler.okhttp.cookie.dumptype=EXCEPTION
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
profiler.okhttp.cookie.sampling.rate=1
# enqueue operation
profiler.okhttp.async=true

###########################################################
# Apache CXF
# Version 2.6.2+ is supported.
# Note: logging.enable must use cxf logging
# see http://cxf.apache.org/docs/message-logging.html
###########################################################
profiler.cxf.service.enable=true
profiler.cxf.logging.enable=false

###########################################################
# fastjson
###########################################################
profiler.json.fastjson=false

###########################################################
# gson
###########################################################
profiler.json.gson=false

###########################################################
# jackson
###########################################################
profiler.json.jackson=false

###########################################################
# json-lib
###########################################################
profiler.json.jsonlib=false

###########################################################
# ActiveMQ Client
###########################################################
profiler.activemq.client.enable=true
profiler.activemq.client.producer.enable=true
profiler.activemq.client.consumer.enable=true
profiler.activemq.client.trace.message=false

# ActiveMQ destination path separator (default is ".")
profiler.activemq.client.destination.separator=

# ActiveMQ destinations to exclude from tracing (comma seprated list of ant-matched destinations)
profiler.activemq.client.destination.exclude=

###########################################################
# RxJava
###########################################################
profiler.rxjava=false

###########################################################
# Hystrix
###########################################################
# profiler.rxjava must also be enabled to properly trace hystrix commands
profiler.hystrix=false

###########################################################
# RestTemplate
###########################################################
profiler.resttemplate=false

###########################################################
# Netty
###########################################################
# recommend netty plugin disable, when using VERTX.
profiler.netty=false
profiler.netty.http=false

###########################################################
# RabbitMQ Client
###########################################################
profiler.rabbitmq.client.enable=true
profiler.rabbitmq.client.producer.enable=true
profiler.rabbitmq.client.consumer.enable=true
# Custom consumer classes to be traced (comma separated list of fully qualified class names)
# If a consumer class is an inner class, specify the outer class
profiler.rabbitmq.client.consumer.classes=
# RabbitMQ exchange to exclude from tracing (comma seprated list of ant-matched destinations)
profiler.rabbitmq.client.exchange.exclude=

###########################################################
# Akka HTTP (Reliability and stability can not be guaranteed)
###########################################################
# HTTP server
profiler.akka.http.enable=false
# original IP address header
profiler.akka.http.realipheader=Remote-Address
# URLs to exclude from tracing
profiler.akka.http.excludeurl=
# HTTP Request methods to exclude from tracing
profiler.akka.http.excludemethod=
# Set transform target
# If you are using another directive, change below config 
profiler.akka.http.transform.targetname=akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2
profiler.akka.http.transform.targetparameter=scala.Function1,scala.Function1,akka.http.scaladsl.server.RequestContext

###########################################################
# Kafka (Reliability and stability can not be guaranteed)
# Version 0.11+ is supported.
# Note: RemoteTrace will not occur if the method specified in the profiler.kafka.consumer.entryPoint is not the first trace point.
###########################################################
profiler.kafka.producer.enable=false
profiler.kafka.consumer.enable=false
# Setting when using spring-kafka (In this case, you can leave profiler.kafka.consumer.entryPoint option to empty.)
profiler.springkafka.consumer.enable=false
// you must set target that handles ConsumerRecord or ConsumerRecords(Remote Trace feature is not enabled.) as a argument for remote trace
// ex) profiler.kafka.consumer.entryPoint=clazzName.methodName
profiler.kafka.consumer.entryPoint=

###########################################################
# Hbase (Reliability and stability can not be guaranteed)
###########################################################
profiler.hbase.client.enable=true
profiler.hbase.client.admin.enable=true
profiler.hbase.client.table.enable=true
profiler.hbase.client.params.enable=false

###########################################################
# GRPC (Reliability and stability can not be guaranteed)
# Version 1.6.0+ is supported.
###########################################################
profiler.grpc.client.enable=false
profiler.grpc.server.enable=false
# In case of streaming, does not track all of each stream request.
# After the streaming open in client, all of each stream request are tracked in one remote trace.
# Therefore, tracking stream request  that you want can be difficult.
# please be sure that this description.
profiler.grpc.server.streaming.enable=false
profiler.grpc.server.streaming.onmessage.enable=false

###########################################################
# Openwhisk (Reliability and stability can not be guaranteed)
# Note: To use Openwhisk plugin, please enable Akka HTTP Plugin and
# change transform target config as follows
# - profiler.akka.http.transform.targetname=akka.http.scaladsl.server.directives.ExecutionDirectives$$anonfun$handleExceptions$1$$anonfun$apply$1.apply
# - profiler.akka.http.transform.targetparameter=akka.http.scaladsl.server.RequestContext
###########################################################
profiler.openwhisk.enable=false
profiler.openwhisk.logging.message=false
profiler.openwhisk.transform.targetname=whisk.http.BasicHttpService$$anonfun$assignId$1$$anonfun$apply$13

参考

搭建环境参考的是:https://www.cnblogs.com/zhi-leaf/p/11417846.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Java8新特性及实战视频教程完整版Java 8 API添加了一个新的抽象称为流Stream,可以让你以一种声明的方式处理数据。Stream 使用一种类似用 SQL 语句从数据库查询数据的直观方式来提供一种对 Java 集合运算和表达的高阶抽象。Stream API可以极大提高Java程序员的生产力,让程序员写出高效率、干净、简洁的代码。这种风格将要处理的元素集合看作一种流, 流在管道中传输, 并且可以在管道的节点上进行处理, 比如筛选, 排序,聚合等。元素流在管道中经过中间操作(intermediate operation)的处理,最后由最终操作(terminal operation)得到前面处理的结果。 Lambda 表达式,也可称为闭包,它是推动 Java 8 发布的最重要新特性。Lambda 允许把函数作为一个方法的参数(函数作为参数传递进方法中)。使用Lambda 表达式可以使代码变的更加简洁紧凑。Java8实战视频-01让方法参数具备行为能力Java8实战视频-02Lambda表达式初探Java8实战视频-03Lambda语法精讲Java8实战视频-04Lambda使用深入解析Java8实战视频-05Lambda方法推导详细解析-上.wmvJava8实战视频-06Lambda方法推导详细解析-下Java8实战视频-07Stream入门及Stream在JVM中的线程表现Java8实战视频-08Stream知识点总结Stream源码阅读Java8实战视频-09如何创建Stream上集Java8实战视频-10如何创建Stream下集.wmvJava8实战视频-11Stream之filter,distinct,skip,limit,map,flatmap详细介绍Java8实战视频-12Stream之Find,Match,Reduce详细介绍Java8实战视频-13NumericStream的详细介绍以及和Stream之间的相互转换Java8实战视频-14Stream综合练习,熟练掌握API的用法Java8实战视频-15在Optional出现之前经常遇到的空指针异常.wmvJava8实战视频-16Optional的介绍以及API的详解Java8实战视频-17Optional之flatMap,综合练习,Optional源码剖析Java8实战视频-18初识Collector体会Collector的强大Java8实战视频-19Collector使用方法深入详细介绍-01Java8实战视频-20Collector使用方法深入详细介绍-02Java8实战视频-21Collector使用方法深入详细介绍-03.wmvJava8实战视频-22Collector使用方法深入详细介绍-04Java8实战视频-23Collector原理讲解,JDK自带Collector源码深度剖析Java8实战视频-24自定义Collector,结合Stream的使用详细介绍Java8实战视频-25Parallel Stream编程体验,充分利用多核机器加快计算速度Java8实战视频-26Fork Join框架实例深入讲解Java8实战视频-27Spliterator接口源码剖析以及自定义Spliterator实现一个Stream.wmvJava8实战视频-28Default方法的介绍和简单的例子Java8实战视频-29Default方法解决多重继承冲突的三大原则详细介绍Java8实战视频-30多线程Future设计模式原理详细介绍,并且实现一个Future程序Java8实战视频-31JDK自带Future,Callable,ExecutorService介绍Java8实战视频-32实现一个异步基于事件回调的Future程序.wmvJava8实战视频-33CompletableFuture用法入门介绍Java8实战视频-34CompletableFuture之supplyAsync详细介绍Java8实战视频-35CompletableFuture流水线工作,join多个异步任务详细讲解Java8实战视频-36CompletableFuture常用API的重点详解-上Java8实战视频-37CompletableFuture常用API的重点详解-下Java8实战视频-38JDK老DateAPI存在的问题,新的DateAPI之LocalDate用法及其介绍.wmvJava8实战视频-39New Date API之LocalTime,LocalDateTime,Instant,Duration,Period详细介绍Java8实战视频-40New Date API之format和parse介绍

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值