Hey, I'm currently doing instrumentation of service and detects some errors rn..
my elastic versions are like below and the problem is when agent comes to the version of 5.3.3 and turn log level from warning to info. The application used to take 2 secs but after changing agent log level to info(elasticapm), it takes more than 6 secs which is too long to open the service.
i assume that since all info level logs are sent to server, the performance might be lower but how can i make it faster??
Kibana version:
7.6.1
Elasticsearch version:
7.6.1
APM Server version:
7.6.1
APM Agent language and version:
python(django), 5.3.3
Browser version:
--- DJANGO BASE.PY ---
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'elasticapm.contrib.django.middleware.TracingMiddleware',
'elasticapm.contrib.django.middleware.Catch404Middleware',
'corsheaders.middleware.CorsMiddleware',
]
LOGGING = {'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt' : "%d/%b/%Y %H:%M:%S"
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {'file': {'level': 'DEBUG',
'class': 'logging.handlers.TimedRotatingFileHandler',
'when' : 'H',
'backupCount': 100,
'filename': LOG_FILE_NAME,
'formatter': 'verbose',
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
'elasticapm': {
'level': 'INFO', (#### <- HERE )
'class': 'elasticapm.contrib.django.handlers.LoggingHandler',
},
},
'loggers': {
'apm.errors': {
'level': 'ERROR',
'handlers': ['console', 'file'],
'propagate': False,
},
'django.db.backends': {
'level': 'ERROR',
'handlers': ['file'], # 'console',
'propagate': False,
},
'django': {'handlers': ['console', 'elasticapm','file'], #'console',
'level': 'INFO',
'propagate': True,
},
'celery': {'handlers': ['console','elasticapm','file'], #'console',
'level': 'INFO',
'propagate': True,
},
'ssg_imgr_app': {
'handlers': ['console', 'elasticapm', 'file'],
'level': 'INFO',
'propagate': True,
},
'ssg-ocr-app': {
'level': 'INFO',
'handlers': ['console', 'elasticapm', 'file'], #'console',
'propagate': True,
},
},
}