Code Monkey home page Code Monkey logo

Comments (15)

kdszh avatar kdszh commented on June 11, 2024

quickstart_plugin.php.txt
I put some debug code in quickstart_plugin.php,restart php ,but still no debug output message:
pinpoint_log(PINPOINT_DEBUG, "quickstart plugin works");

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

@kdszh
Could U give me all file in PluginRootDir(/data/www/pinpoint/quickstart/php/web/plugins2 include plugins_create2.php), I can't reproduce this in my env.

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

sorry, there is no file in /data/www/pinpoint/quickstart/php/web/plugins2, I just want to know how can I ensure that my plugin is successfully loaded ( because I think the quickstart plugin does not work) @eeliu

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

@kdszh
yes, if you did that, agent do nothing.

This is the way to load plugins (written by php), so if "/data/www/pinpoint/quickstart/php/web/plugins2/plugins_create2.php" did not exsit, agent do nothing.

By the way, there are some plugin examples in "pinpoint-c-agent/simulate/web/php/plugins/".
Hope this could help u.

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

ok. Is there any way to know the plugins works ( like print some debug message to log file...)?
here is the example in my env, i guess the CurlPlugin does not work.
aa
bb

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

@kdszh

There are 2 way to debug your plugins

  1. Use pinpoint_log
    pinpoint_log(PINPOINT_DEBUG, "quickstart plugin works");
  1. The plugin file is a php script file, you can print message as you debug the common php file.
  echo "hello, today";
  print_r(array);

CurlPlugin does not work

hmm, I need more information ( pinpoint_agent.conf ,pinpoint_log.txt, and your plugins files )

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

thanks ,i will post the result later @eeliu

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

@eeliu Hi, I try both ways , but no debug message output to log file, here is my files,help
curl_plugin.php.txt
pinpoint_agent.conf.txt
pinpoint_log.txt
plugins_create.php.txt

from pinpoint-c-agent.

ChenGXQQ avatar ChenGXQQ commented on June 11, 2024

@kdszh Do you visit any page? The agent will start after you visit the first page. Please do this and update the log file. We can check more.

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

@kdszh
From you pinpoint_log.txt, no php plugins had added.

Pls check the below

  1. Did your web site running success ?
  2. Access http://xxx:xxx/path to plugins_create.php, did it ok (no error message) ?

if failed, post the error message to us.

Note

plugins_create.php only called once when php-fpm (libphp5.so) get the first request.

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

@eeliu after access my web site , I can see the debug message now.
is there any example for PhpInternalFunctionsPlugin ? I want to get some result like this:
default

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

goto the "GetDateInterceptor"
https://github.com/naver/pinpoint-c-agent/blob/7c1c62459551f80d7076dfe3017586b346afd4e7/simulate/web/php/plugins/quickstart_plugin.php#L18

or use https://github.com/naver/pinpoint-c-agent/blob/7c1c62459551f80d7076dfe3017586b346afd4e7/simulate/web/php/plugins/quickstart_plugin.php#L561

@kdszh

from pinpoint-c-agent.

kdszh avatar kdszh commented on June 11, 2024

@eeliu thanks very much.

from pinpoint-c-agent.

sky-sunny avatar sky-sunny commented on June 11, 2024

转到“GetDateInterceptor”
https://github.com/naver/pinpoint-c-agent/blob/7c1c62459551f80d7076dfe3017586b346afd4e7/simulate/web/php/plugins/quickstart_plugin.php#L18

或使用

https://github.com/naver/pinpoint-c-agent/blob/7c1c62459551f80d7076dfe3017586b346afd4e7/simulate/web/php/plugins/quickstart_plugin.php#L561

@kdszh

PhpInternalFunctionsPlugin

PluginExclude = PhpInternalFunctionsPlugin ####Modify this option to ____________?
luginInclude = PhpRequestPlugin;QuickStartPlugin ; PhpInternalFunctionsPlugin ;ExcludePlugin ;PDOPlugin;CurlPlugin; Modify this option to ____________?

[PHP]
PluginEntryFile=plugins_create.php ####Modify this file?
PluginRootDir=/usr/local/php/etc/web/plugins

I also encountered the same problem, because my English is not good, so I would like to ask how to set up specific.

from pinpoint-c-agent.

eeliu avatar eeliu commented on June 11, 2024

Hi @kdszh
In PHP project, the easiest way to see how it works it use PHP to debug it.

https://github.com/naver/pinpoint-c-agent/releases/tag/v0.2.0 had fully supported plugins wroten by PHP. Hope you use it.
So I close this issue, if you find new problems, create a new one.

from pinpoint-c-agent.

Related Issues (20)

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.