Unfortunately we don't yet support gRPC in the python agent. It's possible we support it in other languages, but since you tagged this python I assume that's what you're using?
We've thought about adding support via python interceptors but it hasn't been high on our priority list. If this is something you'd like to see happen, can you please open an issue with the request?
You're right. I am using python. And I will add an issue.
I've found another question, the timeline can't trace code computing.
Recently, I'd like to optimize some algorithm that there are not any network IO. My request is that monitoring the algorithm timeline. Unfortunately elastic-apm lost the information, like the gRPC trace.
You may be able to use our API to begin and end custom transactions around the pieces of code that you want to instrument.
Our Java agent supports tracing methods, though it is turned off by default because of performance concerns. We've considered adding something similar for Python but it's not on our immediate roadmap.
There's also the capture_span decorator / context manager to manually instrument functions or blocks of code. These will then appear as a span if they are called during a transaction (e.g. a web request).
It is well suited to trace a certain function call which then executes your algorithm, but it's not a great fit for instrumenting hot paths inside your implementation (e.g. in a for loop that will be executed many times). For optimizing an algorithm that you know to be slow, a profiler like pyinstrument, py-spy or pyflame is usually the better fit.
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.