Comments (66)
from pinpoint-c-agent.
why "appid":"no","appname":"no ?
it's an old setting, deprecated now. (agent information can be set at collector-agent side)
from pinpoint-c-agent.
how setting?
from pinpoint-c-agent.
Please tell me how to set up the collector-agent.
from pinpoint-c-agent.
collector-agent
https://github.com/pinpoint-apm/pinpoint-c-agent/blob/dev/DOC/collector-agent/readme.md
php agent
define('APPLICATION_NAME','php');
define('APPLICATION_ID','2');
from pinpoint-c-agent.
what?
from pinpoint-c-agent.
.bash_profile
export PP_COLLECTOR_AGENT_SPAN_IP=127.0.0.1
export PP_COLLECTOR_AGENT_SPAN_PORT=9993
export PP_COLLECTOR_AGENT_AGENT_IP=127.0.0.1
export PP_COLLECTOR_AGENT_AGENT_PORT=9991
export PP_COLLECTOR_AGENT_STAT_IP=127.0.0.1
export PP_COLLECTOR_AGENT_STAT_PORT=9992
export PP_COLLECTOR_AGENT_ISDOCKER=false
export PP_LOG_DIR=/app/pinpoint/logs
export PP_Log_Level=INFO
export PP_ADDRESS=0.0.0.0@9999
php.ini
[pinpoint_php]
extension = pinpoint_php.so
pinpoint_php.CollectorHost = tcp:211.45.120.7:9999
pinpoint_php.SendSpanTimeOutMs = 0
pinpoint_php.TraceLimit = -1
pinpoint_php.DebugReport = true
[error_log]
error_reporting = E_ALL
#log_errors = On
error_log = /var/log/php/php-error.log
common.php
##############PINPOINT###########################
require_once DIR.'/../vendor/autoload.php';
define('APPLICATION_NAME','GNB');
define('APPLICATION_ID','2');
define('AOP_CACHE_DIR',DIR.'/../Cache/');
define('PLUGINS_DIR',DIR.'/../Plugins/');
define('PINPOINT_USE_CACHE','YES');
require_once DIR.'/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
#################################################
Is it different?
It is not registered on the web and cannot be connected to pinpoint-collector.
from pinpoint-c-agent.
Please attach the output of php agent.
https://github.com/pinpoint-apm/pinpoint-c-agent/blob/dev/testapps/PHP/php.ini
Does your pinpoint-collector locate at "PP_COLLECTOR_AGENT_SPAN_IP=127.0.0.1" ?
from pinpoint-c-agent.
It is installed locally.
from pinpoint-c-agent.
collector-agent / pinpoint-collector is installed locally.
from pinpoint-c-agent.
collector.log
[2024-04-15 13:56:50.024840042] INFO client:10.0.0.167:35716 is online
[2024-04-15 13:56:50.024928028] INFO send handshake msg:{"appid":"no","appname":"no","time":"1713141240"}why "appid":"no","appname":"no ?
Please tell me how to set up the collector-agent.
it looks collector-agent woks fine.
from pinpoint-c-agent.
collector.log
[2024-04-15 17:10:43.110591367] INFO client:127.0.0.1:50806 is online
[2024-04-15 17:10:43.110772605] INFO send handshake msg:{"appid":"no","appname":"no","time":"1713165831"}
[2024-04-15 17:10:43.111114644] WARN no FT
[2024-04-15 17:10:43.111140757] WARN dispather packet with an exception: no FT
[2024-04-15 17:10:43.111154559] WARN parseInComePacket catches error:no FT,client:127.0.0.1:50806
[2024-04-15 17:10:43.11116987] INFO connection:127.0.0.1:50806 is shutdown
why isn't registered on the web?
from pinpoint-c-agent.
Enable "log_errors= On " and share us the logging of your php application.
pinpoint-c-agent/testapps/PHP/php.ini
Line 9 in 1bdfc70
from pinpoint-c-agent.
no logging
from pinpoint-c-agent.
collector.log
[2024-04-15 17:51:14.645184858] INFO client:10.0.0.167:60632 is online
[2024-04-15 17:51:14.645371276] INFO send handshake msg:{"appid":"no","appname":"no","time":"1713171031"}
[2024-04-15 17:51:14.64558775] DEBUG size: 275 packetType: 1 body:{":E":252,":FT":1500,":S":1713171074392,"appid":"php-1","appname":"GNB","client":"192.168.10.20","clues":["46:200"],"name":"PHP Request: fpm-fcgi","server":"10.0.0.167","sid":"1718730853","stp":"1500","tid":"php-1^1713171066709^0","uri":"/gnuboard/bbs/board.php?bo_table=qa"}
[2024-04-15 17:51:14.645708234] WARN no FT
[2024-04-15 17:51:14.645762668] WARN dispather packet with an exception: no FT
[2024-04-15 17:51:14.645790138] WARN parseInComePacket catches error:no FT,client:10.0.0.167:60632
[2024-04-15 17:51:14.645831342] INFO connection:10.0.0.167:60632 is shutdown
from pinpoint-c-agent.
collector.log
[2024-04-15 17:51:14.645184858] INFO client:10.0.0.167:60632 is online [2024-04-15 17:51:14.645371276] INFO send handshake msg:{"appid":"no","appname":"no","time":"1713171031"} [2024-04-15 17:51:14.64558775] DEBUG size: 275 packetType: 1 body:{":E":252,":FT":1500,":S":1713171074392,"appid":"php-1","appname":"GNB","client":"192.168.10.20","clues":["46:200"],"name":"PHP Request: fpm-fcgi","server":"10.0.0.167","sid":"1718730853","stp":"1500","tid":"php-1^1713171066709^0","uri":"/gnuboard/bbs/board.php?bo_table=qa"} [2024-04-15 17:51:14.645708234] WARN no FT [2024-04-15 17:51:14.645762668] WARN dispather packet with an exception: no FT [2024-04-15 17:51:14.645790138] WARN parseInComePacket catches error:no FT,client:10.0.0.167:60632 [2024-04-15 17:51:14.645831342] INFO connection:10.0.0.167:60632 is shutdown
Try the latest collector-agent .
docker pull ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:0.5.0
from pinpoint-c-agent.
#define PHP_PINPOINT_PHP_VERSION "0.2.1"
from pinpoint-c-agent.
please update the collector-agent
from pinpoint-c-agent.
don't go build
[pin@Zenius collector-agent]$ go build
common/config.go:9:2: no required module provides package github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1; to add it:
go get github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1
from pinpoint-c-agent.
make error
[pin@Zenius collector-agent]$ make
protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative v1/Annotation.proto v1/Cmd.proto v1/CustomMetric.proto v1/Service.proto v1/Span.proto v1/Stat.proto v1/ThreadDump.proto
google/protobuf/wrappers.proto: File not found.
v1/Annotation.proto: Import "google/protobuf/wrappers.proto" was not found or had errors.
v1/Annotation.proto:15:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:20:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:21:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:26:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:27:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:36:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:47:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:48:5: "google.protobuf.StringValue" is not defined.
make: *** [makefile:8: protoc] Error 1
from pinpoint-c-agent.
you missed the submodule
git clone --recurse-submodules https://github.com/pinpoint-apm/pinpoint-c-agent.git
from pinpoint-c-agent.
fail
from pinpoint-c-agent.
please check the dockerfile of collector-agent
https://github.com/pinpoint-apm/pinpoint-c-agent/blob/dev/collector-agent/Dockerfile
Script for compile collector-agent
...
apk add make protobuf-dev
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
...
from pinpoint-c-agent.
what's mean?
i'm not use docker.
from pinpoint-c-agent.
[root@Zenius collector-agent]# go build
common/config.go:9:2: no required module provides package github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1; to add it:
go get github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1
from pinpoint-c-agent.
please check this #596 (comment)
from pinpoint-c-agent.
Dockerfile?
apk?
[root@Zenius collector-agent]# apk add --no-cache make protobuf-dev
bash: apk: command not found...
????
from pinpoint-c-agent.
I want to install it as server, not as docker
CentOS Linux release 8.5.2111
from pinpoint-c-agent.
I tried by docker of centos 8 ,while it's EOL.
Here is checklist:
- go version (1.18)
- protoc version (3.6.1)
from pinpoint-c-agent.
[root@Zenius pin]# go version
go version go1.22.0 linux/amd64
[root@Zenius pin]# protoc --version
libprotoc 3.5.0
from pinpoint-c-agent.
how about "go install" ?
(venv) pinpoint@pinpoint:/workspace/collector-agent$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go: downloading google.golang.org/protobuf v1.33.0
go: downloading google.golang.org/grpc v1.63.2
from pinpoint-c-agent.
[root@Zenius app]# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go: downloading google.golang.org/protobuf v1.33.0
go: downloading google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
go: downloading google.golang.org/grpc v1.63.2
go: downloading google.golang.org/protobuf v1.28.1
from pinpoint-c-agent.
i think
this link is problem.
no required module provides package github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1
from pinpoint-c-agent.
hmm, how about this command ?
protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative v1/Annotation.proto v1/Cmd.proto v1/CustomMetric.proto v1/Service.proto v1/Span.proto v1/Stat.proto v1/ThreadDump.proto
from pinpoint-c-agent.
[root@Zenius collector-agent]# protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative v1/Annotation.proto v1/Cmd.proto v1/CustomMetric.proto v1/Service.proto v1/Span.proto v1/Stat.proto v1/ThreadDump.proto
google/protobuf/wrappers.proto: File not found.
v1/Annotation.proto: Import "google/protobuf/wrappers.proto" was not found or had errors.
v1/Annotation.proto:15:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:20:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:21:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:26:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:27:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:36:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:47:5: "google.protobuf.StringValue" is not defined.
v1/Annotation.proto:48:5: "google.protobuf.StringValue" is not defined.
from pinpoint-c-agent.
try https://gist.github.com/olivoil/a2e0e4f3427db8b6ef4a6374f9c4cb32
backup the old one, if you need
from pinpoint-c-agent.
[root@Zenius collector-agent]# make
protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative v1/Annotation.proto v1/Cmd.proto v1/CustomMetric.proto v1/Service.proto v1/Span.proto v1/Stat.proto v1/ThreadDump.proto
protoc-gen-go: program not found or is not executable
--go_out: protoc-gen-go: Plugin failed with status code 1.
make: *** [makefile:8: protoc] Error 1
[root@Zenius collector-agent]# go build
common/config.go:9:2: no required module provides package github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1; to add it:
go get github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1
[root@Zenius collector-agent]# protoc --version
libprotoc 3.5.0
[root@Zenius collector-agent]#
from pinpoint-c-agent.
.bash_profile add
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT:$GOPATH:$GOBIN
and compile success
from pinpoint-c-agent.
DB information cannot be retrieved.
from pinpoint-c-agent.
which php framework you used ?
from pinpoint-c-agent.
i'm not used framework.
from pinpoint-c-agent.
by the way, which mysql client used? just pdo ?
php-agent does not support c-level plugins yet, if used yii,
\yii\db\Connection
isJoinPoint
from pinpoint-c-agent.
[root@Zenius lib]# pwd
/app/mysql/lib
[root@Zenius lib]# ls
libmariadbclient.a libmariadb.so libmariadb.so.3 libmysqlclient.a libmysqlclient_r.a libmysqlclient_r.so libmysqlclient.so libmysqlservices.a pkgconfig plugin
from pinpoint-c-agent.
why not call tree?
from pinpoint-c-agent.
my project
html.zip
from pinpoint-c-agent.
As c-level function does not support yet, I will re-implement all plugins to support c-level in future.
sorry
from pinpoint-c-agent.
I don't know how to create a custom plugin.
I'm just an operator, not a developer.
Can you tell me how to set it up?
from pinpoint-c-agent.
I find your project does not follow the psr-4
, that means you can't use this version, even the custom plugin.
Ref
from pinpoint-c-agent.
I tag this issue into next major version.
from pinpoint-c-agent.
In addition to db information, I also want to display call-tree (trace) information and mem information.
I would appreciate your help.
from pinpoint-c-agent.
you can use Pinpoint\Plugins\Sys\PDO
as your PDO plugins on php.
Supported list:
https://github.com/pinpoint-apm/pinpoint-php-aop/tree/dev/lib/Pinpoint/Plugins/Sys
from pinpoint-c-agent.
How should I apply it?
from pinpoint-c-agent.
hmm, I find your project use mysql_connect
, it's not support any more.
try use PDO, or mysqli
Ref
- mysql_connect https://www.php.net/manual/en/function.mysql-connect.php
from pinpoint-c-agent.
I don't know much about php.
I would appreciate it if you could tell me how to apply it to my project.
from pinpoint-c-agent.
OK,
- remove deprecated style for handle mysql, use PDO_MYSQL or msyqli instead.
- After
1
is done, use pinpoint plugins class to replace PDO_MYSQL or msyqli
- PDO -> Pinpoint\Plugins\Sys\PDO\PDO
- mysqli=Pinpoint\Plugins\Sys\mysqli\mysqli
this older file may help you https://github.com/pinpoint-apm/pinpoint-c-agent/blob/v0.4.10/testapps/PHP/Plugins/setting.ini
from pinpoint-c-agent.
I deleted the DB and installed mariadb 10.11 using yum.
However, DB information and trace still do not appear.
from pinpoint-c-agent.
Which db extension you used ? PDO or mysqli ?
I will post an example for you.
from pinpoint-c-agent.
I created an example for you. It reveals how to use pinpoint-php
pinpoint-c-agent/testapps/SimplePHP/run.php
Lines 61 to 66 in 2373d7b
docker compose up simple-php
from pinpoint-c-agent.
sorry. My reply was late due to a business trip.
[root@Zenius ext]# pwd
/usr/include/php/ext
[root@Zenius ext]# ls
date dom filter gd gmp hash iconv json libxml mbstring mysqli mysqlnd pcre pdo phar session simplexml sockets spl standard xml
i used mysqli
from pinpoint-c-agent.
Please check the exmple in run.php
.
https://github.com/pinpoint-apm/pinpoint-c-agent/blob/dev/testapps/SimplePHP/run.php
from pinpoint-c-agent.
[30-Apr-2024 13:03:57 Asia/Seoul] PHP Warning: Use of undefined constant PLUGINS_DIR - assumed 'PLUGINS_DIR' (this will throw an Error in a future version of PHP) in /var/www/html/vendor/pinpoint-apm/pinpoint-php-aop/lib/Pinpoint/Common/PinpointDriver.php on line 37
[30-Apr-2024 13:03:57 Asia/Seoul] PHP Warning: Use of undefined constant PLUGINS_DIR - assumed 'PLUGINS_DIR' (this will throw an Error in a future version of PHP) in /var/www/html/vendor/pinpoint-apm/pinpoint-php-aop/lib/Pinpoint/Common/PinpointDriver.php on line 37
[30-Apr-2024 13:03:57 Asia/Seoul] PHP Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'gnuboard'@'localhost' (using password: YES) in /var/www/html/run.php:22
Stack trace:
#0 /var/www/html/run.php(22): mysqli->__construct()
#1 /var/www/html/run.php(36): call_mysqli()
#2 /var/www/html/run.php(39): main()
#3 {main}
thrown in /var/www/html/run.php on line 22
from pinpoint-c-agent.
I got your problem, try this version:
"pinpoint-apm/pinpoint-php-aop": "v2.2.0",
https://github.com/pinpoint-apm/pinpoint-c-agent/blob/dev/testapps/SimplePHP/composer.json
from pinpoint-c-agent.
[2024-05-07 14:04:27.805790368] INFO client:10.0.0.167:45674 is online
[2024-05-07 14:04:27.805922761] INFO send handshake msg:{"appid":"no","appname":"no","time":"1715058267805","version":"v0.5.0"}
[2024-05-07 14:04:27.806853315] DEBUG size:150 packetType:1 body:{":E":1,":FT":1500,":S":1715058267805,"SQL":"SELECT * FROM g5_login WHERE lo_ip=?","dst":"127.0.0.1 via TCP/IP","name":"Mysqli::prepare","stp":"2101"}
[2024-05-07 14:04:27.806988765] WARN tid in wrong format
[2024-05-07 14:04:27.807044482] WARN no appid
[2024-05-07 14:04:27.807077759] WARN dispatcher packet with an exception: no appid
[2024-05-07 14:04:27.807102949] WARN parsePacket catches error:no appid,client:10.0.0.167:45674
[2024-05-07 14:04:27.807145559] INFO connection:10.0.0.167:45674 is shutdown
from pinpoint-c-agent.
Did you foget this SimplePHP\RequestPlugin , it looks does not loading.
Check this source tree : https://github.com/pinpoint-apm/pinpoint-c-agent/tree/dev/testapps/SimplePHP
from pinpoint-c-agent.
Related Issues (20)
- Problem install collector Agent HOT 3
- go build fail HOT 3
- Anyone available for consultation work for Pinpoint python agent for monitoring Django application HOT 4
- remove unique id at agent HOT 1
- send data error:(Broken pipe) fd:(16) HOT 3
- PHP agent 설치 HOT 1
- PHP Agent 설치 HOT 5
- python flask agent registry failed
- Is there a thrift version for collector agent HOT 4
- [BUG] No call chain when python application call MySql HOT 1
- [BUG] no data displying in Pinpoint Web when send requests
- need some help. I use pinpointPy==1.2.0, found this: NotImplementedError("set_parent_id") HOT 2
- Not able to trace PostgreSql transactions HOT 4
- [BUG] PinpointPy error handling HOT 3
- [FEATURE] Support for psycopg2-binary HOT 3
- pinpoint-c-agent arm build HOT 3
- Method not found: v1.Agent/RequestAgentInfo HOT 4
- How Get TraceId And SpanId In Flask HOT 3
- [Python] trace exclude url HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinpoint-c-agent.