Debugging embedded python library
I have an Embedded Python method, which is essentially a call to one third-party module.
Most of the time, the method takes <0.1 seconds to execute, but sometimes it takes 30 or 60 seconds.
The server is relatively idle (20-30% CPU load).
How can I debug this issue further? Ideally, I want to know where this library spends the time. The library is mainly Python code (it's boto3, so it's not a Python C API proxy library).
Comments
Hi,
I usually monitor the time execution line by line with ^%SYS.MONLBL. But I don't know if it works well with embedded python (it won't with an external call).
Hello.
I agree it works great for ObjectScript code, but it sits at an empy method invocation unfortunately. And I need not even my method, but library calls.
Hi, this is interesting. May I ask you to provide an example of debugging with ^%SYS.MONLBL in Embedded Python?
I'd suggest something like OpenTelemetry tracing + Grafana LTGM