Hello,
We are instrumenting our C++ code manually using ADK
We check for an environment variable to call DYNATRACE_INITIALIZE . Assumption is that if we don't initialize then subsequent dynatrace adk calls should not create purepaths. i.e; calling ADK macros should not affect the code. Is this correct?
How much performance hit it would be to just call for the ADK macros or dynatrace api methods un-conditionally?
What is the best way to turn on and off dynatrace in runtime ?
thanks,
Kalyan
Answer by Bernhard L. ·
Absolutely correct - if the ADK is not initialized any calls will return immediately. Overhead is just the method call and the check for the "is initialzed" condition. ADK calls, which return so-called tags will return "dummy tags", which can be safely used as input parameters as well.
Note that disabling an (ADK) Agent is fairly easy by disabling the "Capture Events" flag in the System Profile / Agent Mapping. This allows to turn off Agents being mapped to that specific Agent group even during run-time, no restart necessary.
Best regards,
Bernhard
JANUARY 15, 3:00 PM GMT / 10:00 AM ET