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 #表创建脚本
注意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,虽然版本不一样,但安装方式和端口一样
1
2
3
4
5$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表
脚本执行完成后可查看导入的表:
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
1
2
3
4
5
6
7$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
1
2
3$sudo cd /usr/local/apache-tomcat-1080/bin $sudo ./startup.sh #启动tomcat容器
- 4.2、安装pinpoint-web
1
2
3
4
5
6
7$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
1
2
3$sudo cd /usr/local/apache-tomcat-2080/bin $sudo ./startup.sh #启动tomcat容器
- 4.3、部署pinpoint-agent
先解压pinpoint-agent到任意目录,本文解压到/home/agent目录
1
2
3
4
5$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参数,其他参数可保持不变。
1
2profiler.collector.ip=127.0.0.1 #后面的ip地址为pinpoint-collector安装地址
参数说明:
1
2
3
4-javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar #pinpoint-agent安装地址 -Dpinpoint.agentId=test-01 #应用ID,全局唯一 -Dpinpoint.applicationName=test #应用名
- 4.3.2、tomcat环境配置
- Linux环境
在$TOMCAT_HOME/bin/目录新增setenv.sh文件(注意.sh文件头以“#!/bin/sh”为第一行),添加配置:
1
2
3
4#!/bin/sh CATALINA_OPTS="$CATALINA_OPTS -javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test"
-
Windows环境
在$TOMCAT_HOME/bin/目录新增setenv.bat文件,添加配置:
1
2set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:E:/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test
如果日志中输出以下信息,则表示配置成功:
- 4.3.3、springboot环境配置
只需在java命令后面加上-javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=xxx -Dpinpoint.applicationName=xxx参数,如:
1
2java -javaagent:/home/agent/pinpoint-bootstrap-1.8.4.jar -Dpinpoint.agentId=test-01 -Dpinpoint.applicationName=test -jar test.jar
例子
1
2java -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收集情况
遇到的问题
- 1.pinpoint web访问慢
pinpoint web部署完成后,在浏览器输入地址访问,pinpoint 界面打开耗时较长甚至有时打不开,打开浏览器的开发模式控制台,可看到如下的错误:
1
2
31. [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
,注释以下代码:
1
2<!--<link href='//fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>-->
并在该文件添加以下代码,引入后续要新建的css文件:
1
2<link href='lib/css/google.css' rel='stylesheet' type='text/css'>
保存修改并退出,那现在我们需要在 pinpoint-web-1.6.2/webapps/ROOT/lib/css
目录下新建google.css
文件。
google.css文件内容,如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17/* 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.woff2
、S6uyw4BMUTPHjx4wXg.woff2
。
如何下载该字体文件呢?
若你可以访问到www.google.com,则步骤如下:
- 浏览器输入
http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjxAwXjeu.woff2
即可下载v14/S6uyw4BMUTPHjxAwXjeu.woff2文件。 - 浏览器输入
http://fonts.gstatic.com/s/lato/v14/S6uyw4BMUTPHjx4wXg.woff2
即可下载S6uyw4BMUTPHjx4wXg.woff2文件。
若你不可以访问google的话,可去这里下载:https://download.csdn.net/download/huixueyi/10593460
、https://download.csdn.net/download/huixueyi/10593470
现在将这两文件上传到pinpoint-web-1.6.2/webapps/ROOT/lib/fonts/
下面。
最后,重启pinpoint-web即可,再次访问web界面就会发现无报错并且加载快了许多。
不能显示完整的链路追踪,只能显示到网关层面
部署了两个服务,一个gateway网关,一个uploads,默认配置只能访问到网关层面,不能看到下游的链路
需要改pinpoint-agent的pinpoint.config,由于官网也没找到详细的配置说明,我就把大部分开关打开了,也是有效的,如果有大兄弟有详细的配置说明可以请教下
贴一下自己的配置:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940# # 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
最后
以上就是无心水壶最近收集整理的关于centos搭建pinpoint及自己踩到的坑CentOS安装PinPoint,并配置tomcat和springboot应用的全部内容,更多相关centos搭建pinpoint及自己踩到内容请搜索靠谱客的其他文章。
发表评论 取消回复