APM 6.6 release, python flask agent are stuck at startup

(Oldcodeoberyn) #1

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

(Oldcodeoberyn) #2

seems it keeping on running in following function

(Benjamin Wohlwend @ APM) #3

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.


(Oldcodeoberyn) #4

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):

(Benjamin Wohlwend @ APM) #5

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": [],