22 Oct 2024 11:52 PM
I have got an extension that sometimes shows entries like the following in Logs:
Now, looking at the extension logs, the last line that is logged is 5 seconds before, after a reasonable number of metric lines have been submitted through the localhost AG API and the execution finishes:
[e03e9985-d95b-3de3-8b21-7ab185efb3c4][-8561665671057482893][409790][out]2024-10-22 23:09:44,275 [INFO] xxxxxxxxxxx (ThreadPoolExecutor-0_0): API HTTP response=202 Body Response={"linesOk":330,"linesInvalid":0,"error":null,"warnings":null}
[e03e9985-d95b-3de3-8b21-7ab185efb3c4][-8561665671057482893][409790][out]2024-10-22 23:09:44,276 [WARNING] api (ThreadPoolExecutor-0_0): Callback Method=query took 74.2712 seconds to execute, which is longer than the interval of 60.0s
Looking further in the logs, in python_statuses.log, I see the same entry, but even 2 seconds more in the future:
"processStatuses":[{"status":"HIGH_CPU","message":"High CPU usage detected for python datasource running configuration e03e9985-d95b-3de3-8b21-7ab185efb3c4","timestamp":"2024-10-22 22:09:51.964 UTC"}]}
So, how can I detect if the CPU alert is related to the execution of the python code in my extension, or something that occurs afterwards?
And, what are the consequences of these "High CPU usage detected for python datasource"?