question

Aoki H. avatar image
Aoki H. asked ·

trace communication between Parent and Child processes on Windows with oneagent SDK

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?

oneagent sdk
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Alram L. avatar image
Alram L. answered ·

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

2 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

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

)

0 Likes 0 · ·

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.

0 Likes 0 · ·
Sonja C. avatar image
Sonja C. answered ·

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

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thank you

The application is coded in C++ on WIndows. What do you mean use-case? Please let me know what information is needed.

0 Likes 0 · ·
system-arch.png (23.5 KiB)