Giter Site home page Giter Site logo

pinpoint-apm / pinpoint-c-agent Goto Github PK

View Code? Open in Web Editor NEW
257.0 35.0 73.0 6.49 MB

It is an agent written by C++, PHP, python languages. And we hope to support other languages by this agent. Until now, it supports [PHP],[C/C++], [PYTHON] and [GO].

Home Page: http://pinpoint-apm.github.io/pinpoint/

License: Apache License 2.0

C++ 43.65% C 3.04% M4 0.21% PHP 6.12% Python 35.14% HTML 1.61% CMake 0.98% Go 7.79% Dockerfile 1.29% Shell 0.09% Makefile 0.07%
pinpoint c apm php monitoring performance agent distributed-tracing yii php5

pinpoint-c-agent's People

Contributors

chengxqq avatar dependabot[bot] avatar eeliu avatar emeroad avatar eugene70 avatar evelyn0927 avatar eyelynsu avatar github-actions[bot] avatar mayingping-bella avatar wooongchi avatar zoey-dot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pinpoint-c-agent's Issues

plugin issue

Hey,

I found the specific functions in plugins folder.
I would like to apply the agent on the production server, need I modify/create these plugins program for our systems?

Thank you!

can't monitor pdo prepare function

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected Behavior

monitor pdo prepare function

Current Behavior

didn't work

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:
    Centos 7 x64

  • PHP Version:
    PHP 5.6.30 (cli) (built: Oct 11 2018 10:27:59)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

  • php.ini:

[pinpoint]
extension=/usr/local/php-fpm/lib/php/extensions/no-debug-non-zts-20131226/pinpoint.so
pinpoint_agent.trace_exception=true
pinpoint_agent.config_full_name=/usr/local/php-fpm/etc/pinpoint_agent.conf

  • php-fpm or apache:
    php-fpm

  • pinpoint_agent.conf:

[common]
AgentID=pp_test
ApplicationName=PA_Sandbox

CollectorSpanIp=10.130.113.73
CollectorSpanPort=9996
CollectorStatIp=10.130.113.73
CollectorStatPort=9995
CollectorTcpIp=10.130.113.73
CollectorTcpPort=9994

TraceLimit = -1
SkipTraceTime = -1
PPLogLevel = DEBUG|INFO|ERROR
LogFileRootPath = /var/log/pinpoint_agent
AgentType=PHP

PluginExclude = ExcludePlugin
PluginInclude = PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;

[PHP]
PluginEntryFile=plugins_create.php
PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/

Failure Logs

Please include any relevant log snippets or files here.

my pdo plugin

<?php
class PrepareInterceptor extends \Pinpoint\Interceptor
{
    var $apiId = -1;
    public function __construct()
    {
        pinpoint_log(PINPOINT_DEBUG, "PDO interceptor prepare");
        $this->apiId = pinpoint_add_api("prepare", -1);
	error_log(date('Y-m-d H:i:s') . 'pdo pre interceptor got api id' . $this->apiId , 3, '/tmp/pdo.log');
    }

    public function onBefore($callId, $args)
    {
	throw new \exception('ssss');
        $trace = pinpoint_get_current_trace();
	error_log(var_export($trace, 1), 3, '/tmp/pdo.log');
        if ($trace)
        {
            pinpoint_log(PINPOINT_DEBUG, "PDO ready trace");
            $event = $trace->traceBlockBegin($callId);
            $event->markBeforeTime();
            $event->addAnnotation(PINPOINT_ANNOTATION_ARGS, htmlspecialchars(print_r($args,true),ENT_QUOTES));
            $event->setApiId($this->apiId);
            $event->setServiceType(PINPOINT_PHP_RPC_TYPE);
        }
    }

    public function onEnd($callId, $data)
    {
        $trace = pinpoint_get_current_trace();
        if ($trace)
        {
            $args = $data["args"];
            $retArgs = $data["result"];
            $event = $trace->getEvent($callId);
            if ($event)
            {
                $event->addAnnotation(PINPOINT_ANNOTATION_RETURN, htmlspecialchars(print_r($retArgs,true), ENT_QUOTES));
                $event->markAfterTime();
                $trace->traceBlockEnd($event);
            }
        }
    }

    public function onException($callId, $exceptionStr)
    {
        $trace = pinpoint_get_current_trace();
        if ($trace)
        {
            $event = $trace->getEvent($callId);
            if ($event)
            {
                $event->markAfterTime();
                $event->setExceptionInfo($exceptionStr);
            }
        }
    }
}

class PDOPlugin extends \Pinpoint\Plugin
{
  public function __construct()
  {
    // you have to call the construct of parent class here
    parent::__construct();
    pinpoint_log(PINPOINT_DEBUG, "PDO construct");
    $i = new PrepareInterceptor();
    pinpoint_log(PINPOINT_DEBUG, "PDO prepare initial finish");
    $this->addInterceptor($i, "PDO::prepare", 'pdo_plugin.php');
    $this->addSimpleInterceptor("date", -1);
  }
}

pinpoint_log.txt php.log php-fpm.log etc (Anything could help us )
pinpoint_log.txt

2019-01-21 10:31:58 [pinpoint] [4516:4516] php_common.cpp:331 [DEBUG]  start agent ...
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.AgentID=pp_test
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.ApplicationName=PA_Sandbox
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.LogFileRootPath=/var/log/pinpoint_agent
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PPLogLevel=DEBUG|INFO|ERROR
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorSpanIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorStatIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorTcpIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorSpanPort=9996
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorStatPort=9995
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorTcpPort=9994
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PluginInclude=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE]  [common.SkipTraceTime] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE]  [common.TraceLimit] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PluginExclude=ExcludePlugin
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:169 [INFO]  [test.ApiTableFile] config not find use default [NULL]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] PHP.PluginEntryFile=plugins_create.php
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] PHP.PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE]  [common.ReconTimeOut] config not find use default [5]
2019-01-21 10:31:58 [pinpoint] [4555:4555] php_common.cpp:331 [DEBUG]  start agent ...
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.AgentID=pp_test
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.ApplicationName=PA_Sandbox
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.LogFileRootPath=/var/log/pinpoint_agent
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PPLogLevel=DEBUG|INFO|ERROR
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorSpanIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorStatIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorTcpIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorSpanPort=9996
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorStatPort=9995
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorTcpPort=9994
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PluginInclude=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE]  [common.SkipTraceTime] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE]  [common.TraceLimit] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PluginExclude=ExcludePlugin
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:169 [INFO]  [test.ApiTableFile] config not find use default [NULL]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] PHP.PluginEntryFile=plugins_create.php
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] PHP.PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE]  [common.ReconTimeOut] config not find use default [5]
2019-01-21 10:32:02 [pinpoint] [4518:4518] pinpoint_ext.cpp:433 [DEBUG] plugins full path /usr/local/pinpoint-c-agent/quickstart/php/web/plugins/plugins_create.php
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:66 [DEBUG] PDO construct
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:7 [DEBUG] PDO interceptor prepare
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:68 [DEBUG] PDO prepare initial finish
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:390 [TRACE] c++ plugin count=1
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:398 [TRACE] php plugin count=2
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:400 [TRACE] all plugins count = 3
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:118 [DEBUG] SafeShareMemory MainProcessChecker_1548037918897 size 0
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:125 [DEBUG] MainProcessChecker_1548037918897 expand 208  createrPid 4518 
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:135 [DEBUG] SafeShareMemory:MainProcessChecker_1548037918897 pid:4518 
2019-01-21 10:32:02 [pinpoint] [4518:4589] trace_data_sender.cpp:42 [INFO] TraceDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:240 [INFO] ApiDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:95 [INFO] StringDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:471 [INFO] PinpointAgent::registerPlugins len(plugins)=3
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:472 [INFO] PinpointAgent::registerPlugins include=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:473 [INFO] PinpointAgent::registerPlugins exclude=ExcludePlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=PhpRequestPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] request_plugin.cpp:90 [INFO] PhpRequestInterceptor::init() SUCCESS!
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=_request
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=CurlPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_exec
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_setopt
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=PDOPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=PDO::prepare
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=date
2019-01-21 10:32:02 [pinpoint] [4518:4589] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4589] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentMonitorBatchTask, interval=5000, callTimes=-1
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497860]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497b20]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497fd0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7fd1c4036af0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7fd1c4036e10]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c4036310]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c40363d0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c4036460]
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:411 [INFO]  pinpoint agent start !!! code = 0
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:193 [INFO] start_connect: 10.130.113.73:9994
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=0, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-1, apiInfo=curl_exec, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=1, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-2, apiInfo=curl_setopt, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=2, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-3, apiInfo=prepare, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=3, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-4, apiInfo=PHP Request, line=<null>, type=100)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=4, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-5, apiInfo=date, line=<null>, type=0)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=5, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-1, stringValue=exception)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=6, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-2, stringValue=error)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=7, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-3, stringValue=warning)]
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentMonitorBatchTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] agent_data_sender.cpp:123 [INFO] TAgentInfo: [0x7fd1c40377d0]
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=86400000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=8, tBase=[TAgentInfo(hostname=test.gadmobe.com, ip=167.99.72.194, ports=80, agentId=pp_test, applicationName=PA_Sandbox, serviceType=1500, pid=4518, agentVersion=1.6.0-SNAPSHOT, vmVersion=, startTimestamp=1548037918897, endTimestamp=<null>, endStatus=<null>, serverMetaData=<null>, jvmInfo=<null>)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 1 => 3
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:251 [INFO] 10.130.113.73:9994 Connect success.
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 3 => 10
2019-01-21 10:32:02 [pinpoint] [4518:4590] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4590] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=60, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] hand_shake_sender.cpp:205 [INFO] get control message: ControlMessage[type=map; data=(ControlMessage[type=string; data=(code)]=>ControlMessage[type=long; data=(0)], ControlMessage[type=string; data=(subCode)]=>ControlMessage[type=long; data=(2)])]
2019-01-21 10:32:02 [pinpoint] [4518:4590] hand_shake_sender.cpp:234 [INFO] handshake response code = Duplex Connection successfully established.
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 10 => 12
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4518:4593] pinpoint_ping.cpp:63 [INFO] send ping: pingId=0, stateVersion=0, stateCode=12
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:540 [DEBUG] get Pong
2019-01-21 10:32:02 [pinpoint] [4557:4557] pinpoint_ext.cpp:433 [DEBUG] plugins full path /usr/local/pinpoint-c-agent/quickstart/php/web/plugins/plugins_create.php
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:66 [DEBUG] PDO construct
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:7 [DEBUG] PDO interceptor prepare
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:68 [DEBUG] PDO prepare initial finish
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:390 [TRACE] c++ plugin count=1
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:398 [TRACE] php plugin count=2
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:400 [TRACE] all plugins count = 3
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:118 [DEBUG] SafeShareMemory MainProcessChecker_1548037918958 size 0
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:125 [DEBUG] MainProcessChecker_1548037918958 expand 208  createrPid 4557 
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:135 [DEBUG] SafeShareMemory:MainProcessChecker_1548037918958 pid:4557 
2019-01-21 10:32:02 [pinpoint] [4557:4596] trace_data_sender.cpp:42 [INFO] TraceDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:240 [INFO] ApiDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:95 [INFO] StringDataSender::init() start. 
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:471 [INFO] PinpointAgent::registerPlugins len(plugins)=3
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:472 [INFO] PinpointAgent::registerPlugins include=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:473 [INFO] PinpointAgent::registerPlugins exclude=ExcludePlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=PhpRequestPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] request_plugin.cpp:90 [INFO] PhpRequestInterceptor::init() SUCCESS!
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=_request
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=CurlPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_exec
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_setopt
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=PDOPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=PDO::prepare
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=date
2019-01-21 10:32:02 [pinpoint] [4557:4596] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4596] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentMonitorBatchTask, interval=5000, callTimes=-1
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15860]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15b20]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15fd0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7f0cdc036af0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7f0cdc036e10]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc036310]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc0363d0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc036460]
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:411 [INFO]  pinpoint agent start !!! code = 0
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:193 [INFO] start_connect: 10.130.113.73:9994
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentMonitorBatchTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=0, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-1, apiInfo=curl_exec, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=1, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-2, apiInfo=curl_setopt, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=2, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-3, apiInfo=prepare, line=<null>, type=<null>)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=3, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-4, apiInfo=PHP Request, line=<null>, type=100)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=4, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-5, apiInfo=date, line=<null>, type=0)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=5, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-1, stringValue=exception)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=6, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-2, stringValue=error)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=7, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-3, stringValue=warning)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 1 => 3
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:251 [INFO] 10.130.113.73:9994 Connect success.
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 3 => 10
2019-01-21 10:32:02 [pinpoint] [4557:4597] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4597] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] agent_data_sender.cpp:123 [INFO] TAgentInfo: [0x7f0cdc039590]
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=86400000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=8, tBase=[TAgentInfo(hostname=test.gadmobe.com, ip=167.99.72.194, ports=80, agentId=pp_test, applicationName=PA_Sandbox, serviceType=1500, pid=4557, agentVersion=1.6.0-SNAPSHOT, vmVersion=, startTimestamp=1548037918958, endTimestamp=<null>, endStatus=<null>, serverMetaData=<null>, jvmInfo=<null>)]
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=60, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] hand_shake_sender.cpp:205 [INFO] get control message: ControlMessage[type=map; data=(ControlMessage[type=string; data=(code)]=>ControlMessage[type=long; data=(0)], ControlMessage[type=string; data=(subCode)]=>ControlMessage[type=long; data=(2)])]
2019-01-21 10:32:02 [pinpoint] [4557:4597] hand_shake_sender.cpp:234 [INFO] handshake response code = Duplex Connection successfully established.
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 10 => 12
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=<null>)
2019-01-21 10:32:03 [pinpoint] [4557:4600] pinpoint_ping.cpp:63 [INFO] send ping: pingId=0, stateVersion=0, stateCode=12
2019-01-21 10:32:03 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300000, callTimes=1
2019-01-21 10:32:03 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:03 [pinpoint] [4557:4597] pinpoint_client.cpp:540 [DEBUG] get Pong

Build.sh error in Ubuntu

Env

ubuntu version ; 16.04
gcc version : gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)


Build.sh script error

emeroad@emeroad-vm:~/c_agent/pinpoint-c-agent/pinpoint_php$ ./Build.sh 
./Build.sh: 43: ./Build.sh: Syntax error: "(" unexpected

Syntax analysis error

When using bash shell

#!/bin/sh -> #!/bin/bash
emeroad@emeroad-vm:~/c_agent/pinpoint-c-agent/pinpoint_php$ ./Build.sh 
built common library ...
none gcov 
none with ci
cc -c -fPIC -Wall  -O3 -DNDEBUG -Werror -isystem /usr/local/include -isystem /home/emeroad/c_agent/include/include -isystem /home/emeroad/c_agent/include/include -L/usr/local/lib -L/home/emeroad/c_agent/include/lib -L/home/emeroad/c_agent/include/lib -o log.o log.c
log.c: In function ‘log_message’:
log.c:115:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
     write(_logInfo.fileFd > -1 ? _logInfo.fileFd : STDERR_FILENO, msgStr,msgLen);
     ^
cc1: all warnings being treated as errors
Makefile:136: recipe for target 'log.o' failed
make: *** [log.o] Error 1
built common library failed ...

ignoring return value error occurred.

pinpoint server versions requirements

Hi.

What are the pinpoint-web/pinpoint-collector version requirements for php plugin agent.

Maybe you could add this information on the main readme.

Thanks

php 7.1.9 fpm 502

Hi,

i deployed pinpoint with php version of 7.1.9, but the the fpm always restart after each request. i didn't modify the quickstart plugin and i am not using multithreading extension. i looked up the php-fpm.log and i found many error like [15-Jan-2019 18:01:06] WARNING: [pool www] child 21796 exited on signal 11 (SIGSEGV) after 5.900995 seconds from start.

could anyone help me out?

thanks.

How can i monitor the c/c++ application, like thrfit c/c++ client application, thank you

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected Behavior

Please describe the behavior you are expecting

Current Behavior

What is the current behavior?

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:

  • PHP Version:

  • php.ini:

  • php-fpm or apache:

  • pinpoint_agent.conf:

Failure Logs

Please include any relevant log snippets or files here.

pinpoint_log.txt php.log php-fpm.log etc (Anything could help us )

Precisiond for addInterceptor / addSimpleInterceptor usage.

Hi.

I plan do code a simple interceptor to trace SQL Queries from Symphony/Doctrine/PDO/Mysql.

I read the API documentation (https://github.com/naver/pinpoint-c-agent/wiki/pinpoint-agent-php-api)

image

and the examples, but i'm still not sure how to register these methods:

What is the correct syntax addInterceptor/addSimpleInterceptor so it match the above methods ?

Thanks
Olivier Fauchon

Is there any way to see quickstart plugins works ok?

Hi,

Is there any way to see the quickstart plugins loads and works ok? I set the pluginEntryFile and PluginRootDir a wrong path as below, and restart pinpoint agent ,but I can not find any [ERROR] in pinpoint_log.txt.

pinpoint_agent.conf:
[PHP]
PluginEntryFile=plugins_create2.php
PluginRootDir=/data/www/pinpoint/quickstart/php/web/plugins2

pinpoint_log.txt:
2018-09-18 14:42:18 [pinpoint] [8851] pinpoint_api.cpp:173 [INFO] PHP.PluginEntryFile=plugins_create1.php
2018-09-18 14:42:18 [pinpoint] [8851] pinpoint_api.cpp:173 [INFO] PHP.PluginRootDir=/data/www/pinpoint/quickstart/php/web/plugins2

Help.
pinpoint_agent.conf.txt
pinpoint_log.txt

undefined symbol: _call_user_function_ex in Unknown on line 0

when i startup the php it always report errors of NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/pinpoint.so' - /usr/local/lib/pinpoint.so: undefined symbol: _call_user_function_ex in Unknown on line 0
Could you help me solve this problem?

Trying to build agent with Mac

Hello, Team

I'm trying to build the agent on MacOS Sierra 10.13+ with the instructions on README.md.

Here is what I did.

  1. Installed Build-essentials

    brew install automake libtool flex bison pkgconfig
    
  2. installed openSSL
    reference

  3. installed gcc48
    reference

  4. modified pinpoint_php/Build.sh
    to retrieve proper CPUNUM since /proc/cpuinfo doesn't work on MacOS

    export CPUNUM=`sysctl -n hw.ncpu`
    

    reference

  5. modified pinpoint_common/Makefile
    deleted -Werror to ignore warning (I'm not sure this is right way to proceed)

  6. I ran Build.sh. Several Errors pop up. And I'm kind of stuck here. any advice?

    I can't find a way to take care of the errors such as

    ./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
            return  pthread_mutex_timedlock(&_mutex,&_timeval);
                    ^
    ./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you 
    mean 'pthread_mutex_destroy'?
                int err = pthread_mutex_consistent(&this->mutex);
    

    I've googled on this for a while, I assume pthread_mutex_* fuctions are not supported by MacOS.

    I can push the branch that I'm working on to the repository if you'd like.

    below is the full log when I run build.sh.

+ SOURCE=./Build.sh
+ '[' -h ./Build.sh ']'
+++ dirname ./Build.sh
++ cd -P .
++ pwd
+ DIR=/Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php
+ source /Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php/../bin/env.sh
++ SOURCE=/Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php/../bin/env.sh
++ '[' -h /Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php/../bin/env.sh ']'
++++ dirname /Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php/../bin/env.sh
+++ cd -P /Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php/../bin
+++ pwd
++ DIR=/Users/user/IdeaProjects/pinpoint-c-agent/bin
++++ dirname /Users/user/IdeaProjects/pinpoint-c-agent/bin
+++ cd -P /Users/user/IdeaProjects/pinpoint-c-agent
+++ pwd
++ PROJECT_DIR=/Users/user/IdeaProjects/pinpoint-c-agent
++ PINPOINT_PHP_DIR=/Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_php
++ PINPOINT_COMMON_DIR=/Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_common
++ TP_DIR=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty
++ TP_PREFIX=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
++ THRIFT_DIR=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/thrift
++ BOOST_DIR=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/boost
+ SHOW_HELP=NO
+ JUST_CLEAN=NO
+ WITH_DEBUG=NO
+ MAKE_PARAS=
+ WITH_GCOV=NO
+ WITH_CI=NO
+ RELEASE=NO
+ main
+ init_env
+ export DISABLE_64BIT=NO
+ DISABLE_64BIT=NO
+ export DEBUG_FLAG=NO
+ DEBUG_FLAG=NO
+ [[ -d /include/boost ]]
+ [[ -d /include/boost ]]
+ echo 'Install boost and thrift into ' /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
Install boost and thrift into  /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
+ cd ../
+ git submodule update --init --recursive
+ cd pinpoint_php
+ source deploy_third_party.sh /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
++ set -x
++ set -e
++ deploy_third_library /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty
++ func_build_boost
++ '[' '!' -f /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib/libboost_atomic.a ']'
++ func_build_thrift
++ '[' '!' -f /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib/libthrift.a ']'
+ export WITH_BOOST_PATH=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
+ WITH_BOOST_PATH=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
+ export WITH_THRIFT_PATH=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
+ WITH_THRIFT_PATH=/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var
+ echo 'built common library ...'
built common library ...
+ platform=unknown
++ uname
+ unamestr=Darwin
+ '[' Darwin == Darwin ']'
+ platform=Mac
+ '[' -z '' ']'
+ '[' Mac == Mac ']'
++ sysctl -n hw.ncpu
+ export CPUNUM=8
+ CPUNUM=8
+ phpize -v
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
+ read_cmd
+ '[' NO = YES ']'
+ '[' NO = YES ']'
+ '[' NO = YES ']'
+ '[' NO = YES ']'
+ echo 'none gcov '
none gcov 
+ build_common
+ cd /Users/user/IdeaProjects/pinpoint-c-agent/pinpoint_common
+ make all -j8
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o pinpoint_agent.o pinpoint_agent.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o log_utility.o log_utility.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o trace.o trace.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o utility.o utility.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o executor.o executor.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o data_sender.o data_sender.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o agent_data_sender.o agent_data_sender.cpp
c++ -c -fPIC -Wall  -O3 -DNDEBUG  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include  -isystem /Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/include   -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib  -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib -L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac -o agent_monitor_sender.o agent_monitor_sender.cpp
clang: warningclang: : argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]clang: 
warningclang: : warning: warningargument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]

clangclang: clang: : warningwarning: warning: : argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]


clang: clang: warning: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/var/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/Users/user/IdeaProjects/pinpoint-c-agent/thirdparty/mac' [-Wunused-command-line-argument]
In file included from trace.cpp:16:
In file included from ./trace.h:25:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from trace.cpp:16:
In file included from ./trace.h:25:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
log_utility.cpp:228:35: error: no member named 'basename' in the global namespace
                    ::getpid(), ::basename((char *) file), line, LogUtility::logLevelToString(level), msg);
                                ~~^
In file included from utility.cpp:17:
./serializer.h:340:20: warning: class 'ControlMessage' was previously declared as a struct [-Wmismatched-tags]
            friend class ControlMessage;
                   ^
./serializer.h:256:16: note: previous use is here
        struct ControlMessage
               ^
./serializer.h:340:20: note: did you mean struct here?
            friend class ControlMessage;
                   ^~~~~
                   struct
In file included from pinpoint_agent.cpp:20:
In file included from ./pinpoint_agent.h:20:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
In file included from data_sender.cpp:16:
In file included from ./data_sender.h:23:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
In file included from utility.cpp:18:
In file included from ./trace.h:25:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from agent_data_sender.cpp:16:
In file included from ./agent_data_sender.h:19:
In file included from ./data_sender.h:23:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from pinpoint_agent.cpp:20:
In file included from ./pinpoint_agent.h:20:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from agent_monitor_sender.cpp:16:
In file included from ./agent_monitor_sender.h:21:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
In file included from data_sender.cpp:16:
In file included from ./data_sender.h:23:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from utility.cpp:18:
In file included from ./trace.h:25:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
In file included from agent_data_sender.cpp:16:
In file included from ./agent_data_sender.h:19:
In file included from ./data_sender.h:23:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
In file included from agent_monitor_sender.cpp:16:
In file included from ./agent_monitor_sender.h:21:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
1 error generated.
make: *** [log_utility.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from executor.cpp:19:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:66:17: error: use of undeclared identifier 'pthread_mutex_timedlock'
        return  pthread_mutex_timedlock(&_mutex,&_timeval);
                ^
./pinpoint_lock.h:123:23: error: use of undeclared identifier 'pthread_mutex_consistent'; did you mean 'pthread_mutex_destroy'?
            int err = pthread_mutex_consistent(&this->mutex);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      pthread_mutex_destroy
/usr/include/pthread.h:366:5: note: 'pthread_mutex_destroy' declared here
int pthread_mutex_destroy(pthread_mutex_t *);
    ^
In file included from executor.cpp:19:
In file included from ./executor.h:22:
In file included from ./memory_pool.h:19:
./pinpoint_lock.h:149:61: error: use of undeclared identifier 'PTHREAD_MUTEX_ROBUST'
            err = pthread_mutexattr_setrobust(&attrs.attrs, PTHREAD_MUTEX_ROBUST);
                                                            ^
./pinpoint_lock.h:185:23: error: use of undeclared identifier 'pthread_mutex_timedlock'
            int err = pthread_mutex_timedlock(&mutex, &abs_time);
                      ^
utility.cpp:182:47: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
            const std::type_info &tb = typeid(*tbasePtr);
                                              ^
In file included from agent_data_sender.cpp:16:
In file included from ./agent_data_sender.h:21:
./serializer.h:340:20: warning: class 'ControlMessage' was previously declared as a struct [-Wmismatched-tags]
            friend class ControlMessage;
                   ^
./serializer.h:256:16: note: previous use is here
        struct ControlMessage
               ^
./serializer.h:340:20: note: did you mean struct here?
            friend class ControlMessage;
                   ^~~~~
                   struct
In file included from pinpoint_agent.cpp:20:
In file included from ./pinpoint_agent.h:22:
In file included from ./agent_data_sender.h:21:
./serializer.h:340:20: warning: class 'ControlMessage' was previously declared as a struct [-Wmismatched-tags]
            friend class ControlMessage;
                   ^
./serializer.h:256:16: note: previous use is here
        struct ControlMessage
               ^
./serializer.h:340:20: note: did you mean struct here?
            friend class ControlMessage;
                   ^~~~~
                   struct
In file included from agent_monitor_sender.cpp:16:
In file included from ./agent_monitor_sender.h:23:
./serializer.h:340:20: warning: class 'ControlMessage' was previously declared as a struct [-Wmismatched-tags]
            friend class ControlMessage;
                   ^
./serializer.h:256:16: note: previous use is here
        struct ControlMessage
               ^
./serializer.h:340:20: note: did you mean struct here?
            friend class ControlMessage;
                   ^~~~~
                   struct
In file included from trace.cpp:21:
In file included from ./pinpoint_agent.h:22:
In file included from ./agent_data_sender.h:21:
./serializer.h:340:20: warning: class 'ControlMessage' was previously declared as a struct [-Wmismatched-tags]
            friend class ControlMessage;
                   ^
./serializer.h:256:16: note: previous use is here
        struct ControlMessage
               ^
./serializer.h:340:20: note: did you mean struct here?
            friend class ControlMessage;
                   ^~~~~
                   struct
4 errors generated.
make: *** [data_sender.o] Error 1
2 warnings and 4 errors generated.
make: *** [utility.o] Error 1
1 warning and 4 errors generated.
4 errors generated.
make: *** [agent_data_sender.o] Error 1
make: *** [executor.o] Error 1
1 warning and 4 errors generated.
make: *** [agent_monitor_sender.o] Error 1
1 warning and 4 errors generated.
In file included from trace.cpp:16:
./trace.h:251:18: warning: private field 'isContinued' is not used [-Wunused-private-field]
            bool isContinued;
                 ^
2 warnings and 4 errors generated.
make: *** [pinpoint_agent.o] Error 1
make: *** [trace.o] Error 1

can't monitor pdo prepare

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected Behavior

agent can trace pdo prepare function

Current Behavior

didn't work

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:
    centos 7 x64

  • PHP Version:
    PHP 5.6.30 (cli) (built: Oct 11 2018 10:27:59)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologie

  • php.ini:
    extension=/usr/local/php-fpm/lib/php/extensions/no-debug-non-zts-20131226/pinpoint.so
    pinpoint_agent.trace_exception=true
    pinpoint_agent.config_full_name=/usr/local/php-fpm/etc/pinpoint_agent.conf

  • php-fpm or apache:
    php-fpm

  • pinpoint_agent.conf:
    [common]
    AgentID=pp_test
    ApplicationName=PA_Sandbox

collector ip address

CollectorSpanIp=10.130.113.73
CollectorSpanPort=9996
CollectorStatIp=10.130.113.73
CollectorStatPort=9995
CollectorTcpIp=10.130.113.73
CollectorTcpPort=9994

TraceLimit = -1
SkipTraceTime = -1

DEBUG|INFO|WARN|ERROR

#PPLogLevel = INFO
PPLogLevel = DEBUG|INFO|ERROR
LogFileRootPath = /var/log/pinpoint_agent

AgentType -> NGINX | APACHE |PHP |TEST

AgentType=PHP

plugin

PhpInternalFunctionsPlugin

PluginExclude = ExcludePlugin
#PluginInclude = PhpRequestPlugin;QuickStartPlugin ; PhpInternalFunctionsPlugin ;ExcludePlugin ;CurlPlugin; PDOPlugin;
PluginInclude = PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;

[PHP]
PluginEntryFile=plugins_create.php
PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/

Failure Logs

my pdo plugin:

apiId = pinpoint_add_api("prepare", -1); error_log(date('Y-m-d H:i:s') . 'pdo pre interceptor got api id' . $this->apiId , 3, '/tmp/pdo.log'); } public function onBefore($callId, $args) { throw new \exception('ssss'); $trace = pinpoint_get_current_trace(); error_log(var_export($trace, 1), 3, '/tmp/pdo.log'); if ($trace) { pinpoint_log(PINPOINT_DEBUG, "PDO ready trace"); $event = $trace->traceBlockBegin($callId); $event->markBeforeTime(); $event->addAnnotation(PINPOINT_ANNOTATION_ARGS, htmlspecialchars(print_r($args,true),ENT_QUOTES)); $event->setApiId($this->apiId); $event->setServiceType(PINPOINT_PHP_RPC_TYPE); } } public function onEnd($callId, $data) { $trace = pinpoint_get_current_trace(); if ($trace) { $args = $data["args"]; $retArgs = $data["result"]; $event = $trace->getEvent($callId); if ($event) { $event->addAnnotation(PINPOINT_ANNOTATION_RETURN, htmlspecialchars(print_r($retArgs,true), ENT_QUOTES)); $event->markAfterTime(); $trace->traceBlockEnd($event); } } } public function onException($callId, $exceptionStr) { $trace = pinpoint_get_current_trace(); if ($trace) { $event = $trace->getEvent($callId); if ($event) { $event->markAfterTime(); $event->setExceptionInfo($exceptionStr); } } } } class PDOPlugin extends \Pinpoint\Plugin { public function __construct() { // you have to call the construct of parent class here parent::__construct(); pinpoint_log(PINPOINT_DEBUG, "PDO construct"); $i = new PrepareInterceptor(); pinpoint_log(PINPOINT_DEBUG, "PDO prepare initial finish"); $this->addInterceptor($i, "PDO::prepare", 'pdo_plugin.php'); $this->addSimpleInterceptor("date", -1); } } > plugin_create.php $path=dirname(__FILE__); foreach (glob($path ."/*plugin.php") as $value) { include_once($value); } //$p = new QuickStartPlugin(); //pinpoint_add_plugin($p, "quickstart_plugin.php"); //$p = new ExcludePlugin(); //pinpoint_add_plugin($p, "exclude_plugin.php"); $p = new CurlPlugin(); pinpoint_add_plugin($p, "curl_plugin.php"); $p = new PDOPlugin(); pinpoint_add_plugin($p, "pdo_plugin.php"); ?>

pinpoint_log.txt php.log php-fpm.log etc (Anything could help us )
pinpoint_log.txt:
2019-01-21 10:31:58 [pinpoint] [4516:4516] php_common.cpp:331 [DEBUG] start agent ...
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.AgentID=pp_test
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.ApplicationName=PA_Sandbox
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.LogFileRootPath=/var/log/pinpoint_agent
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PPLogLevel=DEBUG|INFO|ERROR
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorSpanIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorStatIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.CollectorTcpIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorSpanPort=9996
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorStatPort=9995
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:193 [INFO] common.CollectorTcpPort=9994
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PluginInclude=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE] [common.SkipTraceTime] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE] [common.TraceLimit] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] common.PluginExclude=ExcludePlugin
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:169 [INFO] [test.ApiTableFile] config not find use default [NULL]
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] PHP.PluginEntryFile=plugins_create.php
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:173 [TRACE] PHP.PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/
2019-01-21 10:31:58 [pinpoint] [4516:4516] pinpoint_api.cpp:208 [TRACE] [common.ReconTimeOut] config not find use default [5]
2019-01-21 10:31:58 [pinpoint] [4555:4555] php_common.cpp:331 [DEBUG] start agent ...
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.AgentID=pp_test
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.ApplicationName=PA_Sandbox
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.LogFileRootPath=/var/log/pinpoint_agent
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PPLogLevel=DEBUG|INFO|ERROR
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorSpanIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorStatIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.CollectorTcpIp=10.130.113.73
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorSpanPort=9996
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorStatPort=9995
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:193 [INFO] common.CollectorTcpPort=9994
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PluginInclude=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE] [common.SkipTraceTime] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE] [common.TraceLimit] config not find use default [-1]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] common.PluginExclude=ExcludePlugin
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:169 [INFO] [test.ApiTableFile] config not find use default [NULL]
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] PHP.PluginEntryFile=plugins_create.php
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:173 [TRACE] PHP.PluginRootDir=/usr/local/pinpoint-c-agent/quickstart/php/web/plugins/
2019-01-21 10:31:58 [pinpoint] [4555:4555] pinpoint_api.cpp:208 [TRACE] [common.ReconTimeOut] config not find use default [5]
2019-01-21 10:32:02 [pinpoint] [4518:4518] pinpoint_ext.cpp:433 [DEBUG] plugins full path /usr/local/pinpoint-c-agent/quickstart/php/web/plugins/plugins_create.php
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:66 [DEBUG] PDO construct
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:7 [DEBUG] PDO interceptor prepare
2019-01-21 10:32:02 [pinpoint] [4518:4518] pdo_plugin.php:68 [DEBUG] PDO prepare initial finish
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:390 [TRACE] c++ plugin count=1
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:398 [TRACE] php plugin count=2
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:400 [TRACE] all plugins count = 3
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:118 [DEBUG] SafeShareMemory MainProcessChecker_1548037918897 size 0
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:125 [DEBUG] MainProcessChecker_1548037918897 expand 208 createrPid 4518
2019-01-21 10:32:02 [pinpoint] [4518:4589] memory_pool.h:135 [DEBUG] SafeShareMemory:MainProcessChecker_1548037918897 pid:4518
2019-01-21 10:32:02 [pinpoint] [4518:4589] trace_data_sender.cpp:42 [INFO] TraceDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:240 [INFO] ApiDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:95 [INFO] StringDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:471 [INFO] PinpointAgent::registerPlugins len(plugins)=3
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:472 [INFO] PinpointAgent::registerPlugins include=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:473 [INFO] PinpointAgent::registerPlugins exclude=ExcludePlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=PhpRequestPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] request_plugin.cpp:90 [INFO] PhpRequestInterceptor::init() SUCCESS!
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=request
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=CurlPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_exec
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_setopt
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_agent.cpp:500 [TRACE] plugin=PDOPlugin
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=PDO::prepare
2019-01-21 10:32:02 [pinpoint] [4518:4589] interceptor.cpp:77 [DEBUG] add interceptor, name=date
2019-01-21 10:32:02 [pinpoint] [4518:4589] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4589] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentMonitorBatchTask, interval=5000, callTimes=-1
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497860]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497b20]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2497fd0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7fd1c4036af0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7fd1c4036e10]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c4036310]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c40363d0]
2019-01-21 10:32:02 [pinpoint] [4518:4589] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7fd1c4036460]
2019-01-21 10:32:02 [pinpoint] [4518:4589] pinpoint_ext.cpp:411 [INFO] pinpoint agent start !!! code = 0
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:193 [INFO] start_connect: 10.130.113.73:9994
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=0, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-1, apiInfo=curl_exec, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=1, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-2, apiInfo=curl_setopt, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=2, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-3, apiInfo=prepare, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=3, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-4, apiInfo=PHP Request, line=, type=100)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=4, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918897, apiId=-5, apiInfo=date, line=, type=0)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=5, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-1, stringValue=exception)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=6, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-2, stringValue=error)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=7, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918897, stringId=-3, stringValue=warning)]
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask
in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentMonitorBatchTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] agent_data_sender.cpp:123 [INFO] TAgentInfo: [0x7fd1c40377d0]
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=86400000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=8, tBase=[TAgentInfo(hostname=test.gadmobe.com, ip=167.99.72.194, ports=80, agentId=pp_test, applicationName=PA_Sandbox, serviceType=1500, pid=4518, agentVersion=1.6.0-SNAPSHOT, vmVersion=, startTimestamp=1548037918897, endTimestamp=, endStatus=, serverMetaData=, jvmInfo=)]
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 1 => 3
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:251 [INFO] 10.130.113.73:9994 Connect success.
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 3 => 10
2019-01-21 10:32:02 [pinpoint] [4518:4590] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4590] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=60, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] hand_shake_sender.cpp:205 [INFO] get control message: ControlMessage[type=map; data=(ControlMessage[type=string; data=(code)]=>ControlMessage[type=long; data=(0)], ControlMessage[type=string; data=(subCode)]=>ControlMessage[type=long; data=(2)])]
2019-01-21 10:32:02 [pinpoint] [4518:4590] hand_shake_sender.cpp:234 [INFO] handshake response code = Duplex Connection successfully established.
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.h:272 [INFO] state change: 10 => 12
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4590] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4518:4593] pinpoint_ping.cpp:63 [INFO] send ping: pingId=0, stateVersion=0, stateCode=12
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4518:4593] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4518:4590] pinpoint_client.cpp:540 [DEBUG] get Pong
2019-01-21 10:32:02 [pinpoint] [4557:4557] pinpoint_ext.cpp:433 [DEBUG] plugins full path /usr/local/pinpoint-c-agent/quickstart/php/web/plugins/plugins_create.php
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:66 [DEBUG] PDO construct
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:7 [DEBUG] PDO interceptor prepare
2019-01-21 10:32:02 [pinpoint] [4557:4557] pdo_plugin.php:68 [DEBUG] PDO prepare initial finish
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:390 [TRACE] c++ plugin count=1
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:398 [TRACE] php plugin count=2
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:400 [TRACE] all plugins count = 3
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:118 [DEBUG] SafeShareMemory MainProcessChecker_1548037918958 size 0
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:125 [DEBUG] MainProcessChecker_1548037918958 expand 208 createrPid 4557
2019-01-21 10:32:02 [pinpoint] [4557:4596] memory_pool.h:135 [DEBUG] SafeShareMemory:MainProcessChecker_1548037918958 pid:4557
2019-01-21 10:32:02 [pinpoint] [4557:4596] trace_data_sender.cpp:42 [INFO] TraceDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:240 [INFO] ApiDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:95 [INFO] StringDataSender::init() start.
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:471 [INFO] PinpointAgent::registerPlugins len(plugins)=3
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:472 [INFO] PinpointAgent::registerPlugins include=PhpRequestPlugin;PhpInternalFunctionsPlugin;CurlPlugin;PDOPlugin;
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:473 [INFO] PinpointAgent::registerPlugins exclude=ExcludePlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=PhpRequestPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] request_plugin.cpp:90 [INFO] PhpRequestInterceptor::init() SUCCESS!
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=request
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=CurlPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_exec
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=curl_setopt
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_agent.cpp:500 [TRACE] plugin=PDOPlugin
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=PDO::prepare
2019-01-21 10:32:02 [pinpoint] [4557:4596] interceptor.cpp:77 [DEBUG] add interceptor, name=date
2019-01-21 10:32:02 [pinpoint] [4557:4596] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4596] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentMonitorBatchTask, interval=5000, callTimes=-1
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15860]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15b20]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x2c15fd0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7f0cdc036af0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] api_data_sender.cpp:280 [TRACE] TApiMetaData: [0x7f0cdc036e10]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc036310]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc0363d0]
2019-01-21 10:32:02 [pinpoint] [4557:4596] string_data_sender.cpp:113 [TRACE] TStringMetaData: [0x7f0cdc036460]
2019-01-21 10:32:02 [pinpoint] [4557:4596] pinpoint_ext.cpp:411 [INFO] pinpoint agent start !!! code = 0
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask
in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:193 [INFO] start_connect: 10.130.113.73:9994
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentMonitorBatchTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=0, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-1, apiInfo=curl_exec, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=1, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-2, apiInfo=curl_setopt, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=2, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-3, apiInfo=prepare, line=, type=)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=3, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-4, apiInfo=PHP Request, line=, type=100)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=4, tBase=[TApiMetaData(agentId=pp_test, agentStartTime=1548037918958, apiId=-5, apiInfo=date, line=, type=0)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=5, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-1, stringValue=exception)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=6, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-2, stringValue=error)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=7, tBase=[TStringMetaData(agentId=pp_test, agentStartTime=1548037918958, stringId=-3, stringValue=warning)]
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 1 => 3
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:251 [INFO] 10.130.113.73:9994 Connect success.
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 3 => 10
2019-01-21 10:32:02 [pinpoint] [4557:4597] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=1, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4597] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] agent_data_sender.cpp:123 [INFO] TAgentInfo: [0x7f0cdc039590]
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=agentDataTask, interval=86400000, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.cpp:336 [DEBUG] doRequest: requestId=8, tBase=[TAgentInfo(hostname=test.gadmobe.com, ip=167.99.72.194, ports=80, agentId=pp_test, applicationName=PA_Sandbox, serviceType=1500, pid=4557, agentVersion=1.6.0-SNAPSHOT, vmVersion=, startTimestamp=1548037918958, endTimestamp=, endStatus=, serverMetaData=, jvmInfo=)]
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add agentDataTask
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=handShakeTask, interval=60, callTimes=1
2019-01-21 10:32:02 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add handShakeTask
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] hand_shake_sender.cpp:205 [INFO] get control message: ControlMessage[type=map; data=(ControlMessage[type=string; data=(code)]=>ControlMessage[type=long; data=(0)], ControlMessage[type=string; data=(subCode)]=>ControlMessage[type=long; data=(2)])]
2019-01-21 10:32:02 [pinpoint] [4557:4597] hand_shake_sender.cpp:234 [INFO] handshake response code = Duplex Connection successfully established.
2019-01-21 10:32:02 [pinpoint] [4557:4597] pinpoint_client.h:272 [INFO] state change: 10 => 12
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:02 [pinpoint] [4557:4597] serializer.cpp:226 [TRACE] get tbase: type=320, context=TResult(success=1, message=)
2019-01-21 10:32:03 [pinpoint] [4557:4600] pinpoint_ping.cpp:63 [INFO] send ping: pingId=0, stateVersion=0, stateCode=12
2019-01-21 10:32:03 [pinpoint] [4557:4600] executor.cpp:73 [DEBUG] ScheduledExecutor: scheduledExecutor add task: name=pingTask, interval=300000, callTimes=1
2019-01-21 10:32:03 [pinpoint] [4557:4600] executor.cpp:94 [DEBUG] run addTask_ in io.run() thread: add pingTask
2019-01-21 10:32:03 [pinpoint] [4557:4597] pinpoint_client.cpp:540 [DEBUG] get Pong

mysql plugin

Hi.

Are you already working on a mysql plugin ?
If not I'd like to do start working on this feature.

Could you please fix curl plugin, so it can be used as a 'template' (issue #12 )

Thanks
Olivier

Laravel Framework: exception: The payload is invalid.

Hi,
I try to run the quickstart_pluginin( GetDateInterceptor ) my laravel framework, an exception appears.

exception: The payload is invalid. in /data/www/mid/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 191

laravel version: 5.7
php version: 7.1.13
LARAVEL_HOME/routes/web.php:
web.php.txt

pinpoint web :

ggggg

config not find use default [NULL]

2018-11-07 16:21:48 [pinpoint] [2464] pinpoint_api.cpp:193 [INFO] common.CollectorSpanPort=9996
2018-11-07 16:21:48 [pinpoint] [2464] pinpoint_api.cpp:193 [INFO] common.CollectorStatPort=9995
2018-11-07 16:21:48 [pinpoint] [2464] pinpoint_api.cpp:193 [INFO] common.CollectorTcpPort=9994
2018-11-07 16:21:48 [pinpoint] [2464] pinpoint_api.cpp:169 [INFO] [test.ApiTableFile] config not find use default [NULL]

error

{type: "RESPONSE", command: "activeThreadCount",…}
command
:
"activeThreadCount"
result
:
{timeStamp: 1540371855635, applicationName: "PHP_App",…}
activeThreadCounts
:
{PHP_Agent: {code: -1, message: "PINPOINT INTERNAL ERROR"}}
PHP_Agent
:
{code: -1, message: "PINPOINT INTERNAL ERROR"}
code
:
-1
message
:
"PINPOINT INTERNAL ERROR"
applicationName
:
"PHP_App"
timeStamp
:
1540371855635
type
:
"RESPONSE"

Support Nginx ?

Hi, does pinpoint-c-agent support "nginx + php-fpm" now ? thanks.

Pinpoint Php Agent for PHP 7.2 (Archlinux)

Hi,

I'm trying to run pinpoint php on Archlinux (Php-fmp 7.2)

$ pacman -Q | grep php
php 7.2.8-1
php-apache 7.2.8-1
php-fpm 7.2.9-1
gcc-libs 8.1.1+20180531-1

But the provided .so PHP module are not compatible:

$ php
PHP Warning: PHP Startup: pinpoint: Unable to initialize module
Module compiled with module API=20160303
PHP compiled with module API=20170718

So I decided to build it ... But I get the following error :

trace_data_sender.cpp: In member function ‘int32_t Pinpoint::Agent::TraceDataSender::init()’:
trace_data_sender.cpp:53:89: error: no matching function for call to ‘apache::thrift::protocol::TCompactProtocolTapache::thrift::transport::TTransport::TCompactProtocolT(boost::shared_ptrapache::thrift::transport::TMemoryBuffer&)’
TCompactProtocol *tp = new(std::nothrow) TCompactProtocol(this->transportOut);

Any help welcome.

Olivier Fauchon

when i restart php-fpm,pinpoint can't collect data.

environment

PHP 5.6.36、CentOS Linux release 7.6.1810 (Core)、nginx/1.14.1、Boost 1.5.8+、 Thirft 0.11.0+、 gcc 4.4.7+


configuration files

php.ini

[pinpoint]
extension= /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/pinpoint.so
pinpoint_agent.trace_exception=true
pinpoint_agent.config_full_name=/usr/local/php/etc/pinpoint_agent.conf

pinpoint_agent.conf

pinpoint_agent.conf.txt

pinpoint_log.txt

pinpoint_log.txt

plugin files

curl_plugin.php.txt
plugins_create.php.txt
quickstart_plugin.php.txt
exclude_plugin.php.txt


i try to delete pinpoint_log.txt and visit any page,it can't automatic generation,and when i execute 'php -m','pinpoint_log.txt' will be generated.

Error when start simulate collector

[Test Env.]
Ubuntu 16.04.3
pinpoint_c_agent(test) 1acf5fe
php-7.2.3

[Test Steps]

  1. install boost and thrift
  2. run run_test.py
python run_test.py ../conf/php_test_conf_ci.json

[Result]
An error occurred:

g++ -c -fPIC -Wall -DTEST_SIMULATE -g3 -DDEBUG -Werror  -isystem /usr/include  -isystem /usr/include   -L/usr/lib  -L/usr/lib -o pinpoint_client.o pinpoint_client.cpp
g++ -c -fPIC -Wall -DTEST_SIMULATE -g3 -DDEBUG -Werror  -isystem /usr/include  -isystem /usr/include   -L/usr/lib  -L/usr/lib -o pinpoint_ping.o pinpoint_ping.cpp
cc -c -fPIC -Wall -DTEST_SIMULATE -g3 -DDEBUG -Werror  -isystem /usr/include  -isystem /usr/include   -L/usr/lib  -L/usr/lib -o log.o log.c
ar rcs libpinpoint_common.a pinpoint_agent.o pinpoint_agent_context.o log_utility.o trace.o utility.o serializer.o executor.o data_sender.o buffer.o agent_data_sender.o agent_monitor_sender.o hand_shake_sender.o trace_data_sender.o api_data_sender.o string_data_sender.o pinpoint_api.o pinpoint_plugin.o pinpoint_type.o pinpoint_client.o pinpoint_ping.o log.o ./thrift/gen-cpp/Trace_types.o ./thrift/gen-cpp/Command_types.o ./thrift/gen-cpp/Pinpoint_types.o ./thrift/gen-cpp/Trace_constants.o ./thrift/gen-cpp/Command_constants.o ./thrift/gen-cpp/Pinpoint_constants.o
make[1]: Leaving directory `/home/travis/build/EyelynSu/pinpoint-c-agent/pinpoint_common'
# make -C /home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/../../pinpoint_common/  with-boost-path=/usr with-thrift-path=/usr -j4
g++ -g3 -DTEST_SIMULATE collector.cpp server.o server_handler.o collector_context.o tbase_op.o checker_handler.o test_case.o -isystem /usr/include -isystem /usr/include -I/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/../../pinpoint_common/  -lpinpoint_common   -L/usr/lib -L/usr/lib -lthrift -lboost_system -lboost_thread -lboost_filesystem -lboost_date_time -lgcov -lrt -lpthread -L/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/../../pinpoint_common/ -o test_collector
g++ -g3 -DTEST_SIMULATE checker.cpp server.o server_handler.o collector_context.o tbase_op.o checker_handler.o test_case.o -isystem /usr/include -isystem /usr/include -I/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/../../pinpoint_common/ -L/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/../../pinpoint_common/  -lpinpoint_common -L/usr/lib -L/usr/lib -lthrift -lboost_system -lboost_thread -lboost_filesystem -lboost_date_time -lgcov -lrt -lpthread  -o test_checker
tbase_op.o: In function `TBaseOPImp::writeTbaseToJsonFile(boost::filesystem::path const&, apache::thrift::TBase const&)':
/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/tbase_op.cpp:299: undefined reference to `apache::thrift::protocol::TJSONProtocol::TJSONProtocol(boost::shared_ptr<apache::thrift::transport::TTransport>)'
tbase_op.o: In function `TBaseOPImp::readTbaseFromJsonFile(short, boost::filesystem::path const&)':
/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/tbase_op.cpp:334: undefined reference to `apache::thrift::protocol::TJSONProtocol::TJSONProtocol(boost::shared_ptr<apache::thrift::transport::TTransport>)'
collect2: error: ld returned 1 exit status
make: *** [collector] Error 1
make: *** Waiting for unfinished jobs....
tbase_op.o: In function `TBaseOPImp::writeTbaseToJsonFile(boost::filesystem::path const&, apache::thrift::TBase const&)':
/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/tbase_op.cpp:299: undefined reference to `apache::thrift::protocol::TJSONProtocol::TJSONProtocol(boost::shared_ptr<apache::thrift::transport::TTransport>)'
tbase_op.o: In function `TBaseOPImp::readTbaseFromJsonFile(short, boost::filesystem::path const&)':
/home/travis/build/EyelynSu/pinpoint-c-agent/simulate/collector/tbase_op.cpp:334: undefined reference to `apache::thrift::protocol::TJSONProtocol::TJSONProtocol(boost::shared_ptr<apache::thrift::transport::TTransport>)'
collect2: error: ld returned 1 exit status
make: *** [checker] Error 1
Make collector fail.

detailed plugin api

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected Behavior

Please describe the behavior you are expecting

Current Behavior

What is the current behavior?

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:

  • PHP Version:

  • php.ini:

  • php-fpm or apache:

  • pinpoint_agent.conf:

Failure Logs

Please include any relevant log snippets or files here.

pinpoint_log.txt php.log php-fpm.log etc (Anything could help us )

Want to Linking libstdc++ and libgcc statically

Hi ,
When I run PHP, I get the following error:

[05-Nov-2018 14:21:19 PRC] PHP Warning: PHP Startup: Unable to load dynamic library '/home/homework/php/ext/pinpoint.so' - /mnt/homework/php/bin/../../lib/gcc-3.4.5/libstdc++.so.6: version `CXXABI_1.3.1' not found (required by /home/homework/php/ext/pinpoint.so) in Unknown on line 0

I run ldd and got the following results:
ldd pinpoint.so
libboost_system.so.1.63.0 => /usr/local/lib/libboost_system.so.1.63.0 (0x00007f9456a65000)
libboost_thread.so.1.63.0 => /usr/local/lib/libboost_thread.so.1.63.0 (0x00007f9456841000)
libboost_filesystem.so.1.63.0 => /usr/local/lib/libboost_filesystem.so.1.63.0 (0x00007f945662a000)
libboost_date_time.so.1.63.0 => /usr/local/lib/libboost_date_time.so.1.63.0 (0x00007f9456416000)
libthrift-0.11.0.so => /usr/local/lib/libthrift-0.11.0.so (0x00007f94560ad000)

libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f9456c69000)
libc.so.6 => /lib64/libc.so.6 (0x00007f945587e000)

(I Can't Upgrade libstdc++. So.6 and libc.so.6 for my PHP)
I want to linking libstdc++ 、 libgcc 、libboost、libthrift statically,make their so not in ldd result.

Please tell me how to config。

how is failed/successful response defined

Hi,

I wanna know how the successful reponse and failed response are defined. I tried locally and found that the response was regarded as successful one even the status code is 4xx or 5xx.

thanks.

The agent and php-fpm crash after a few requestes

Hi:
I've met a wired problem.

My Env:Nginx+PHP7.2+GCC4.7.4....Boost and Thrift are new version.
After i build pinpoint.so successfully and config that into php.ini,it can be worked in a few requests,the request times same as number of php-fpm max-children,and the server create same numbers udp connection but not close,after that,my server will crash down.

It seems like the server can't reuese  those udp connections so it can't load the classes in pinpoint_plugins.

Can you help me to figure out this problem?

Update thrift to 0.11.0

If boost is not installed at /usr/bin, Thrift 0.10.0 compile fails.

So we want to update it to 0.11.0

todo list:

  • Because Java uses thrifit 0.10.0, we should test the two's compatibility.
  • If ok, we want to use submodule to mange our dependance.
  • We should allow users to use their libraries(not installed by our scripts)

error: possibly undefined macro: AM_EXTRA_RECURSIVE_TARGETS

HI guy:
when i run ./Build.sh, I got some errors , can you help me?
os is centos 6.8
autoconf version : 2.68
automake version : 1.6.3

  Configuring for:

PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
configure.ac:110: warning: macro `AM_EXTRA_RECURSIVE_TARGETS' not found in library
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from...
aclocal/libtool.m4:785: _LT_LANG is expanded from...
aclocal/libtool.m4:768: LT_LANG is expanded from...
aclocal/libtool.m4:796: _LT_LANG_DEFAULT_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from...
aclocal/libtool.m4:785: _LT_LANG is expanded from...
aclocal/libtool.m4:768: LT_LANG is expanded from...
aclocal/libtool.m4:796: _LT_LANG_DEFAULT_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:93: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal/libtool.m4:5343: _LT_LANG_CXX_CONFIG is expanded from...
aclocal/libtool.m4:785: _LT_LANG is expanded from...
aclocal/libtool.m4:768: LT_LANG is expanded from...
aclocal/libtool.m4:796: _LT_LANG_DEFAULT_CONFIG is expanded from...
aclocal/libtool.m4:138: _LT_SETUP is expanded from...
aclocal/libtool.m4:67: LT_INIT is expanded from...
aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:93: the top level
configure.ac:110: error: possibly undefined macro: AM_EXTRA_RECURSIVE_TARGETS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.

Build Agent Error

--------- with docker -------

FROM php:7.2.16-fpm
LABEL maintainer="[email protected]" app="nginx"
ENV DOC_ROOT /var/www/html/

RUN apt-get update && apt-get install -y zlib1g-dev libcurl4-gnutls-dev autoconf libssl-dev git libtool automake libtool flex bison git

WORKDIR /usr/local/src/
RUN git clone http://github.com/naver/pinpoint-c-agent.git
RUN cd ./pinpoint-c-agent/pinpoint_php && ./Build.sh && make install

------- errro message --------
/usr/local/src/pinpoint-c-agent/thirdparty/var/include/thrift/protocol/TCompactProtocol.h:77:3: note: no known conversion for argument 1 from 'boost::shared_ptrapache::thrift::transport::TMemoryBuffer' to 'std::shared_ptrapache::thrift::transport::TTransport'
/usr/local/src/pinpoint-c-agent/thirdparty/var/include/thrift/protocol/TCompactProtocol.h:36:7: note: candidate: apache::thrift::protocol::TCompactProtocolTapache::thrift::transport::TTransport::TCompactProtocolT(const apache::thrift::protocol::TCompactProtocolTapache::thrift::transport::TTransport&)
class TCompactProtocolT : public TVirtualProtocol<TCompactProtocolT<Transport_> > {
^~~~~~~~~~~~~~~~~
/usr/local/src/pinpoint-c-agent/thirdparty/var/include/thrift/protocol/TCompactProtocol.h:36:7: note: no known conversion for argument 1 from 'boost::shared_ptrapache::thrift::transport::TMemoryBuffer' to 'const apache::thrift::protocol::TCompactProtocolTapache::thrift::transport::TTransport&'
Makefile:129: recipe for target 'serializer.o' failed
make: *** [serializer.o] Error 1
make: *** Waiting for unfinished jobs....

building failed

What version of pinpoint are you using?
dev

What did you do to trigger the bug?
ubuntu18.04 gcc 7.3.0
git clone and ./Build.sh

Logs

g++ -c -fPIC -Wall -O3 -DNDEBUG -Werror -isystem /root/pinpoint-c-agent/thirdparty/var/include -isystem /root/pinpoint-c-agent/thirdparty/var/include -L/root/pinpoint-c-agent/thirdparty/var/lib -L/root/pinpoint-c-agent/thirdparty/var/lib -o pinpoint_agent.o pinpoint_agent.cpp
g++ -c -fPIC -Wall -O3 -DNDEBUG -Werror -isystem /root/pinpoint-c-agent/thirdparty/var/include -isystem /root/pinpoint-c-agent/thirdparty/var/include -L/root/pinpoint-c-agent/thirdparty/var/lib -L/root/pinpoint-c-agent/thirdparty/var/lib -o pinpoint_agent_context.o pinpoint_agent_context.cpp
In file included from pinpoint_agent_context.cpp:18:0:
pinpoint_api.h:63:68: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated]
static int64_t stringToInt64(const std::string& value) throw (std::invalid_argument);
^~~~~
cc1plus: all warnings being treated as errors
Makefile:129: recipe for target 'pinpoint_agent_context.o' failed
make: *** [pinpoint_agent_context.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from utility.h:30:0,
from executor.h:21,
from pinpoint_agent.h:20,
from pinpoint_agent.cpp:20:
pinpoint_api.h:63:68: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated]
static int64_t stringToInt64(const std::string& value) throw (std::invalid_argument);
^~~~~
In file included from trace_data_sender.h:23:0,
from pinpoint_agent.h:25,
from pinpoint_agent.cpp:20:
trace.h:318:63: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated]
const std::vector<int8_t> &transactionId) throw(std::invalid_argument);
^~~~~
trace.h:320:87: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated]
static TransactionId parseTransactionId(const std::string &transactionId) throw(std::invalid_argument);
^~~~~
cc1plus: all warnings being treated as errors
Makefile:129: recipe for target 'pinpoint_agent.o' failed
make: *** [pinpoint_agent.o] Error 1

when i restart php-fpm pinpoint_logs.txt is not achived

excute this commond : php -m |grep pinpoint
return "pinpoint"
my pinpoint_agent.conf below
AgentID=calculation
ApplicationName=calculationApplication

collector ip address

CollectorSpanIp=10.28.3.136
CollectorSpanPort=9996
CollectorStatIp=10.28.3.136
CollectorStatPort=9995
CollectorTcpIp=10.28.3.136
CollectorTcpPort=9994

TraceLimit = -1
SkipTraceTime = -1

DEBUG|INFO|WARN|ERROR

PPLogLevel = INFO
LogFileRootPath =/data/logs

AgentType -> NGINX | APACHE |PHP |TEST

AgentType=PHP

plugin

PhpInternalFunctionsPlugin

PluginExclude = ExcludePlugin
PluginInclude = PhpRequestPlugin;QuickStartPlugin ; PhpInternalFunctionsPlugin ;ExcludePlugin ;PDOPlugin;CurlPlugin;

[PHP]
PluginEntryFile=plugins_create.php
PluginRootDir=/usr/share/nginx/html/pinpoint_plugins
;eg: PluginRootDir=/home/apps/php-7.1.0/pinpoint/web/php/plugins

hope you can help me

Build Agent Error

hi~
when i run Build.sh,got the error:
fatal error: thrift/cxxfunctional.h: No such file or directory

Linux: CentOS Linux release 7.3.1611 (Core)
Thanks

PHP 7.1.11 Curl Plugin issue

Environment
PHP 7.1.11
Centos 7.4
php-c-agent 1.60 from git clone https://github.com/naver/pinpoint-c-agent.git
boost 1.63
thrift 0.11

Followed steps from https://github.com/naver/pinpoint-c-agent/tree/dev

I am unable to resolve this issue . Whenever I embed pinpoint-c-agent in my php.ini. I start to get SEGMENTATION FAULT errors in my apache logs.

And the pinpoint log contains the following lines:

16:02:15 [pinpoint] [30336] php_common.cpp:961 [ERROR] w_zend_call_method throw: [exception: Undefined index: Resource id #501 in /opt/pinpoint-c-agent/quickstart/php/web/plugins/curl_plugin.php on line 37]
16:02:15 [pinpoint] [30336] php_interfaces.cpp:969 [ERROR] Interceptor name=[curl_exec] onbefore failed!!! please check your code!!!
16:02:15 [pinpoint] [30336] trace.cpp:481 [ERROR] mark bad trace !!! check your plugins...

It would be nice if anyone could help me out. I am a newbie in pinpoint

Exception Handling and Symphony

Hi.

I deployed php agent on a Symphony application.

It would be great to have backtrace when exception occurs in complement of Exception instantiation:

image

image

Thanks.
Olivier

pinpoint 监控PHP 7.1.18 导致服务接口报502

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:

  • PHP Version:7.1.18

  • php.ini:
    #[pinpoint]
    #extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/pinpoint.so
    #pinpoint_agent.trace_exception=true
    #pinpoint_agent.config_full_name=/etc/pinpoint_agent.conf

  • php-fpm or apache:

  • pinpoint_agent.conf:

Failure Logs

Please include any relevant log snippets or files here.

pinpoint_log.txt php.log php-fpm.log etc (Anything could help us )
nginx.log
2019/01/07 18:15:16 [error] 8764#0: *675619 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.16.11.15, server: aa.aa.com, request: "GET /login HTTP/1.0", upstream: "fastcgi://unix:/dev/shm/php-fpm.sock:", host: "aa.aa.com"
页面报502
使用:dmesg查看内存段信息,如下:
[1785023.865348] php-fpm[24598]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785023.874692] php-fpm[22983]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785023.886354] php-fpm[22977]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785023.902489] php-fpm[22975]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785075.281942] show_signal_msg: 67 callbacks suppressed
[1785075.284435] php-fpm[23750]: segfault at 1f ip 00007f37d5434138 sp 00007ffdf1632a50 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.107474] php-fpm[25486]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.240001] php-fpm[25487]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.252099] php-fpm[25484]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.265427] php-fpm[25494]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.290318] php-fpm[22168]: segfault at 1f ip 00007f37d5434138 sp 00007ffdf1632a50 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.301557] php-fpm[25479]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.327310] php-fpm[25492]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.335888] php-fpm[25493]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785083.473034] php-fpm[27185]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785143.802892] show_signal_msg: 11 callbacks suppressed
[1785143.807406] php-fpm[25665]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785143.938092] php-fpm[22727]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785143.972574] php-fpm[25720]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785143.996950] php-fpm[25685]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785143.998009] php-fpm[25703]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785143.998012] in pinpoint.so[7f37d5373000+192000]

[1785143.998744] php-fpm[25704]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785143.998746] in pinpoint.so[7f37d5373000+192000]

[1785144.005282] php-fpm[25702]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785144.005285] in pinpoint.so[7f37d5373000+192000]

[1785144.007718] php-fpm[25731]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785144.007720] in pinpoint.so[7f37d5373000+192000]

[1785144.032407] php-fpm[25795]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4
[1785144.034615] php-fpm[25718]: segfault at 1e ip 00007f37d5434138 sp 00007ffdf1638270 error 4 in pinpoint.so[7f37d5373000+192000]
[1785144.060163] in pinpoint.so[7f37d5373000+192000]
[1785144.077203] in pinpoint.so[7f37d5373000+192000]

Pinpoint Php Agent for PHP 5.4 No Data

pinpoint 1.8.2
PHP 5.4.41 (cli) (built: Jul 5 2017 04:26:31)
centos 6.8
pinpoint-agent tag v0.1.1

config
[common]
AgentID=php
ApplicationName=php

collector ip address

CollectorSpanIp=10.x.x.x
CollectorSpanPort=9996
CollectorStatIp=10.x.x.x
CollectorStatPort=9995
CollectorTcpIp=10.x.x.x
CollectorTcpPort=9994

TraceLimit = -1
SkipTraceTime = -1

DEBUG|INFO|WARN|ERROR

PPLogLevel = DEBUG
LogFileRootPath = /opt/agent

AgentType -> NGINX | APACHE |PHP |TEST

AgentType="PHP"

plugin

PhpInternalFunctionsPlugin

PluginExclude = ExcludePlugin
PluginInclude = PhpRequestPlugin;QuickStartPlugin ; PhpInternalFunctionsPlugin ;ExcludePlugin ;PDOPlugin;CurlPlugin;

[PHP]
PluginEntryFile=plugins_create.php
PluginRootDir=/opt/pinpoint-c-agent/quickstart/php/web/plugins/

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.