This is a Pinpoint agent written by other languages. We hope to support other languages(not Java) by this agent. Until now, it supports PHP language
eeliu on enh-http-path
eeliu on master
[enh] httpclient add path (#38) (compare)
eeliu on enh-http-path
[enh] httpclient add path (compare)
eeliu on master
Update README.md use the lates… (compare)
eeliu on master
add show more (#442) (compare)
eeliu on master
[enh] httpClient add args (#37) (compare)
eeliu on enh-httpclient
eeliu on enh-httpclient
[enh] httpClient add args (compare)
eeliu on enh-httpclient
[enh] add PinHttpClientFunc/tes… [enh] httpClient add args (compare)
eeliu on master
[doc] add QQ group (#440) * QQ… (compare)
eeliu on master
[enh] add PinHttpClientFunc/tes… Merge pull request #36 from pin… (compare)
eeliu on enh-user-httpclient
~/pinpoint-c-agent # /usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
~/pinpoint-c-agent # ./configure --with-php-config=/usr/local/php/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-zts-20180731
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... yes
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for pinpoint_php support... yes, shared
checking whether to enable pinpoint_php support... yes, shared
checking support test... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
------Build common libraries------------
./configure: line 4777: cmake: command not found
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... n
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
~/pinpoint-c-agent # make
/bin/bash /root/pinpoint-c-agent/libtool --mode=link cc -DPHP_ATOM_INC -I/root/pinpoint-c-agent/include -I/root/pinpoint-c-agent/main -I/root/pinpoint-c-agent -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -I/root/pinpoint-c-agent/common/include -I/root/pinpoint-c-agent/src/PHP -DHAVE_CONFIG_H -g -O2 -o pinpoint_php.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/pinpoint-c-agent/modules src/PHP/pinpoint_php.lo -lstdc++ -L/root/pinpoint-c-agent/common/lib -l:libpinpoint_common.a -l:libjsoncpp.a -lrt
mkdir .libs
cc -shared src/PHP/.libs/pinpoint_php.o -lstdc++ -L/root/pinpoint-c-agent/common/lib -l:libpinpoint_common.a -l:libjsoncpp.a -lrt -Wl,-soname -Wl,pinpoint_php.so -o .libs/pinpoint_php.so
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -l:libpinpoint_common.a
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -l:libjsoncpp.a
collect2: error: ld returned 1 exit status
make: * [Makefile:199: pinpoint_php.la] Error 1
@eeliu hi,I've done all the steps according to the official tutorial. the step you can see below:
~ # tail /ebsig/etc/php/php-fpm.ini
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.save_comments=0
opcache.fast_shutdown=1
opcache.enable_file_override=1
extension=pinpoint_php.so
pinpoint_php.CollectorHost=unix:/tmp/collector-agent.sock
pinpoint_php.SendSpanTimeOutMs=0
pinpoint_php.TraceLimit=-1
~ # ll /tmp
total 516
srwxr-xr-x 1 root root 0 Sep 18 17:39 collector-agent.sock
-rw------- 1 root root 103 Sep 18 17:01 openresty-stderr---supervisor-1UjyMV.log
-rw------- 1 root root 0 Sep 18 17:01 openresty-stdout---supervisor-Cbvn4H.log
-rw------- 1 root root 0 Sep 18 17:01 php-fpm-stderr---supervisor-4peN5t.log
-rw------- 1 root root 0 Sep 18 17:01 php-fpm-stdout---supervisor-5Bl4vG.log
-rw------- 1 root root 0 Sep 18 17:01 rsyslog-stderr---supervisor-uJgfXH.log
-rw------- 1 root root 0 Sep 18 17:01 rsyslog-stdout---supervisor-Yjqk_s.log
srwx------ 1 root root 0 Sep 18 17:01 supervisor.sock
-rw-r--r-- 1 root root 516852 Sep 18 17:01 supervisord.log
-rw-r--r-- 1 root root 2 Sep 18 17:01 supervisord.pid
~ # cd /root/pinpoint-c-agent/collector-agent/conf/
~/pinpoint-c-agent/collector-agent/conf # ll
total 4
-rw-r--r-- 1 root root 709 Sep 17 11:07 collector.conf
~/pinpoint-c-agent/collector-agent/conf # cat collector.conf
[Collector]
AgentID=dev
ApplicationName=dev-app
ServerType=1500
collector.grpc.agent.ip=collectorHost
collector.grpc.agent.port=9991
collector.grpc.stat.ip=collectorHost
collector.grpc.stat.port=9992
collector.grpc.span.ip=collectorHost
collector.grpc.span.port=9993
collector.grpc.discardpolicy.maxpendingthreshold=10000
[Common]
Web_Port=8001
Log_Level=ERROR
LOG_DIR=/var/log/
[Agent]
Address=/tmp/collector-agent.sock
~/pinpoint-c-agent/collector-agent/conf # cd ..
~/pinpoint-c-agent/collector-agent # python3 run.py
Traceback (most recent call last):
File "run.py", line 31, in <module>
from Common.Config import CAConfig
File "/root/pinpoint-c-agent/collector-agent/Common/Config.py", line 37, in <module>
CAConfig = get_conf('COLLECTOR_CONFIG')
File "/root/pinpoint-c-agent/collector-agent/Common/Config.py", line 27, in get_conf
raise Exception("COLLECTOR_CONFIG not found in your environment")
Exception: COLLECTOR_CONFIG not found in your environment
~/pinpoint-c-agent/collector-agent #
~/pinpoint-c-agent/collector-agent #
~/pinpoint-c-agent/collector-agent # export COLLECTOR_CONFIG=/root/pinpoint-c-agent/collector-agent/conf/collector.conf
~/pinpoint-c-agent/collector-agent # python3 run.py
^CKeyboardInterrupt
2020-09-21T00:57:22Z
~/pinpoint-c-agent/collector-agent # cat /var/lo
local/ lock/ log/
~/pinpoint-c-agent/collector-agent # cd /var/log/
/var/log # ll
total 4
-rw-r--r-- 1 root root 0 Sep 17 11:07 collector.agent.log
-rw-r--r-- 1 root root 0 Sep 17 11:07 front.agent.log
drwxr-xr-x 2 root root 4096 Jul 31 15:12 php7
/var/log # cat collector.agent.log
/var/log # cat front.agent.log
/var/log #
@eeliu hi,I have read the content of the link and solved the problem that the so library file could not be found. However, there is still no data from the agent side in the server. And no error logs were generated, my php.ini As shown below
~/pinpoint-c-agent/collector-agent # ll
total 44
drwxr-xr-x 1 root root 4096 Sep 17 10:48 CollectorAgent
drwxr-xr-x 1 root root 4096 Sep 17 10:48 Common
drwxr-xr-x 1 root root 4096 Sep 17 10:48 Events
drwxr-xr-x 1 root root 4096 Sep 17 10:48 PHPAgent
drwxr-xr-x 1 root root 4096 Sep 17 10:48 PinpointAgent
drwxr-xr-x 1 root root 4096 Sep 17 09:27 Proto
drwxr-xr-x 2 root root 4096 Sep 17 09:27 Test
drwxr-xr-x 1 root root 4096 Sep 17 11:07 conf
-rw-r--r-- 1 root root 282 Sep 17 10:52 init_python_env.sh
-rw-r--r-- 1 root root 52 Sep 17 09:27 requirements.txt
-rw-r--r-- 1 root root 1951 Sep 17 09:27 run.py
~/pinpoint-c-agent/collector-agent # python3 run.py
^CKeyboardInterrupt
2020-09-21T06:39:29Z
~/pinpoint-c-agent/collector-agent # ll /var/log/
total 4
-rw-r--r-- 1 root root 0 Sep 17 11:07 collector.agent.log
-rw-r--r-- 1 root root 0 Sep 17 11:07 front.agent.log
drwxr-xr-x 2 root root 4096 Jul 31 15:12 php7
~/pinpoint-c-agent/collector-agent # cat /ebsig/etc/php/php-fpm.ini
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /var/log/php7.3-err.log
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 50M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
include_path = ".:/ebsig/data"
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
file_uploads = On
upload_max_filesize = 50M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
memory_limit = 128M
soap.wsdl_cache_enabled=0
max_execution_time=300
extension=/root/pinpoint-c-agent/.libs/pinpoint_php.so
pinpoint_php.CollectorHost=unix:/tmp/collector-agent.sock
pinpoint_php.SendSpanTimeOutMs=0
pinpoint_php.TraceLimit=-1
[Date]
date.timezone = Asia/Shanghai
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Syslog]
define_syslog_variables = Off
[SQL]
sql.safe_mode = Off
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[mysqlnd]
mysqlnd.collect_statistics = Off
mysqlnd.collect_memory_statistics = Off
[bcmath]
bcmath.scale = 0
[Session]
session.save_handler = files
session.use_cookies = 1
session.cookie_lifetime = 31536000
[extension]
extension_dir ="/ebsig/ext/"
extension=redis.so
extension=zip.so
extension=rdkafka.so
[opcache]
zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
opcache.file_cache=/dev/shm
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.save_comments=0
opcache.fast_shutdown=1
opcache.enable_file_override=1
~/pinpoint-c-agent/collector-agent # ll /root/pinpoint-c-agent/.libs/pinpoint_php.so
-rwxr-xr-x 1 root root 438184 Sep 17 09:38 /root/pinpoint-c-agent/.libs/pinpoint_php.so