2: You can do that but only during startup. So no code change is needed, but you can only attach the agent when the process is starting - attaching to running processes is not passible. For this we have a feature currently in Beta that does exactly that. You can find it here - our plan is to get this out of beta soon. There is a documentation linked on that page on how to use it. The agent code itself is the same as the GA agent, so beta only applies to the runtime attachment code part.
1: Not currently, but we have an issue for thus in our GitHub repo and we plan to have this capability in the future.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.