15 Jul 2019 03:00 AM
There is a topic titled “Using the Dynatrace OneAgent SDK with forked child processes (only available on Linux)“on the URL
https://github.com/Dynatrace/OneAgent-SDK-for-C
Does this mean on Windows shared agent can’t be used between Parent and Child processes?
Is there a way to trace communication between Parent and Child processes on Windows with oneagent SDK?
Solved! Go to Solution.
15 Jul 2019 06:55 AM
Hi Aoki!
what is your use case - what are you looking to achieve with the OneAgent SDK? please provide more details and we'll check if we can support your use case.
Sonja
15 Jul 2019 08:25 AM
Thank you
The application is coded in C++ on WIndows. What do you mean use-case? Please let me know what information is needed.
15 Jul 2019 11:39 AM
Hi Aoki!
The fork API in that form exists on Unix like operating systems only. On Windows, the StartProcess API works in a completely other way and doesn't allow to share an agent between parent and child process therefore.
But that doesn't mean, that you can't trace between parent and child processes.
On Windows every process will start their own agent. You need to setup the OneAgent SDK for C/C++ in both processes (parent + child). To trace communication between them use (for example) Outgoing-/Incoming remotecall. You need to transport the tag (received from the OutgoingRemoteCallTracer) over communicationchannel being used by parent- and child process (e. g. named pipe, shared memory, ...).
Be aware, that initializing the SDK in every process is a expensive operation and may take some time. If your application starts child processes often (e. g. for every dispachted request; child processes then are short living), it would be better to redesign your application to use child processes that are alive for longer time.
BR
Alram
15 Jul 2019 01:05 PM
Thank you for your explanation. It is the same as my understanding.
Unfortunately the prospect can't change the design of their package software.
I have already told our concerned about the overhead and we are going to assess the overhead in a paid POC. We might narrow down the scope of oneagent SDK depending on the overhead.
(just use oneagent SDK for capturing resident process - DB access
)
15 Jul 2019 01:55 PM
If "Resident process" starts for every single request a new "Child Process", then it would be better to use a Custom-Service tracer instead of use the OneAgent SDK inside the child process ... the downside is, that you have only one time (from start to termination of the child process). no details about the DB access itself.