Closed enhon1992 closed 1 month ago
Good question !
similar to how the official pinpoint Java agent automatically collects JVM metrics
I don't know what's is "JVM metrics in cpp applications", do you want to get JVM metric in dynamic library which writen by cpp/c from your java application? if that, use pinpoint-java agent please.
performs trace instrumentation for some common frameworks?
What's your common framework and what's kind of it ? (http/https server or tcp/udp event )
out-of-box plugin like php/python agent
Not yet
If your application is totally a cpp/c application, read below please.
I'm here to share some experiments about cpp/c application in pinpoint.
There are two important topic : monitor entry
and monitor chain
Http server or some like gRpc, message queue .. etc, we call them as event driver server. It will produce a monitor chain when it parse a message(request) and pinpoint trace Entry starts from here.
Next topic is monitor chain
, that describes how to arrange your work flow on execution unit.
It's a set of function calling process(called interceptor in pinpoint),like
redis.get
,mysql_client.query
C/C++ does not support AOP
Just decorate monitor function, like pin_func
Every traced process must come with a parent, we combined these processes with tree structure.
current_trace_id = pinpoint_start_trace(parent_trace_id);
By pinpoint-c-agent,you can fetch and modify a trace chain by itself id.
Things are starting to get complicated
The chain id should be kept into request context and shared to every subsequent calls.
Example libevent-example. Read more
pinpoint provides asynchronous context API which allows to combine multiple calls chains into one.
More detail goes to https://github.com/pinpoint-apm/pinpoint-c-agent/issues/689
If you have more question, please left comment
close as completed
Feel free to re-open, if have more questions.
Can we use pinpoint-c-agent to directly monitor our C/C++ applications, similar to how the official pinpoint Java agent automatically collects JVM metrics and performs trace instrumentation for some common frameworks?