APM 6.6 release, python flask agent are stuck at startup

After I upgrade the agent from 4.0.3 to 4.1.0, I can't start the app which use APM python agent.
It is stuck after the log print:

base_metrics.py[line:63] DEBUG Starting metrics collect timer

seems it keeping on running in following function

Hi @oldcodeoberyn

Thanks for reporting this! It looks like there might be an issue with logging the warning that psutil isn't installed (assuming you haven't installed it). Can you try and install psutil and see if the problem goes away? Also, if you configured your logging setup, that configuration might also be helpful in resolving this.


I already installed psutil. I don't know what do you mean 'configured your logging setup', I have logger configuration

I trace the code in debug mode, it do find the psutil, it just keep on running in function def transform(value, stack=None, context=None):

Hi @oldcodeoberyn

I'm still investigating this, but so far haven't managed to reproduce it. In the meantime, you could try one of the following options to disable metrics until we can figure out a fix:

app.config["ELASTIC_APM"] = {
    # ...
    # or
    "METRICS_SETS": [],

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.