Open ktsivkov opened 1 month ago
This would rack up quite a bit of overhead. Have you played with easy-instrumentation at all?
@iamemilio No, but just checked the readme file. It looks quite interesting, I will definitely have a look!
Don't hesitate to leave us some feedback! We don't have the ability to exclude functions at the moment, but can track that as a possible feature.
Provide helper functions to enable easier and cleaner way to start transactions and segments.
Summary
By my experience most of the time the applications that require transactions they are quite straight forward.
Desired Behaviour
Optimally will be nice to have a way to wrap application specific functions that when invoked will start transactions and segments without coupling the application code to the agent's behavior, and without changing their underlying type.
To achieve the wrapping behavior we can use reflections, and to avoid changing the underlying type of the "wrapees" we can use generics.
Possible Solution
I can think of two solutions, the easiest one could be the addition of helper functions WrapTransactionFunc and WrapSegmentFunc, and they can be implemented like this: