Fresh installation commcare hq datadog error

Hi everyone, I have an error message on datadog in all cchq commands.
See an example

(ansible) it@monolith:~$ commcare-cloud monolith django-manage shell /home/it/.virtualenvs/ansible/lib/python2.7/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography import x509
ssh 10.10.10.250 -t -o UserKnownHostsFile=/home/it/environments/monolith/known_hosts ‘sudo -iu cchq bash -c ‘"’"‘cd /home/cchq/www/monolith/current; python_env-3.6/bin/python manage.py shell’"’"’’
Ubuntu 18.04.5 LTS
2020-12-10 17:13:27,046 INFO - DATADOG TRACER CONFIGURATION - {“date”: “2020-12-10T17:13:27.031605”, “os_name”: “Linux”, “os_version”: “4.15.0-112-generic”, “is_64_bit”: true, “architecture”: “64bit”, “vm”: “CPython”, “version”: “0.44.0”, “lang”: “python”, “lang_version”: “3.6.9”, “pip_version”: “20.2.3”, “in_virtual_env”: true, “agent_url”: “http://localhost:8126”, “agent_error”: “Agent not reachable. Exception raised: [Errno 111] Connection refused”, “env”: “”, “is_global_tracer”: false, “enabled_env_setting”: null, “tracer_enabled”: true, “sampler_type”: “DatadogSampler”, “priority_sampler_type”: “RateByServiceSampler”, “service”: “”, “debug”: false, “enabled_cli”: false, “analytics_enabled”: false, “log_injection_enabled”: false, “health_metrics_enabled”: false, “dd_version”: “”, “priority_sampling_enabled”: true, “global_tags”: “”, “tracer_tags”: “”, “integrations”: {“asyncio”: “N/A”, “boto”: “N/A”, “botocore”: {“enabled”: true, “instrumented”: false, “module_available”: true, “module_version”: “1.18.12”, “module_imported”: false, “config”: “N/A”}, “bottle”: “N/A”, “cassandra”: “N/A”, “celery”: {“enabled”: true, “instrumented”: false, “module_available”: true, “module_version”: “4.1.1.1”, “module_imported”: true, “config”: “N/A”}, “consul”: “N/A”, “django”: “N/A”, “elasticsearch”: {“enabled”: true, “instrumented”: false, “module_available”: true, “module_version”: “1.9.0”, “module_imported”: false, “config”: “N/A”}, “algoliasearch”: “N/A”, “futures”: “N/A”, “grpc”: “N/A”, “mongoengine”: “N/A”, “mysql”: “N/A”, “mysqldb”: “N/A”, “pymysql”: “N/A”, “psycopg”: “N/A”, “pylibmc”: “N/A”, “pymemcache”: “N/A”, “pymongo”: “N/A”, “redis”: {“enabled”: true, “instrumented”: false, “module_available”: true, “module_version”: “3.5.3”, “module_imported”: true, “config”: “N/A”}, “rediscluster”: “N/A”, “requests”: {“enabled”: true, “instrumented”: false, “module_available”: true, “module_version”: “2.24.0”, “module_imported”: true, “config”: “N/A”}, “sanic”: “N/A”, “sqlalchemy”: “N/A”, “sqlite3”: “N/A”, “aiohttp”: “N/A”, “aiopg”: “N/A”, “aiobotocore”: “N/A”, “httplib”: “N/A”, “vertica”: “N/A”, “molten”: “N/A”, “jinja2”: “N/A”, “mako”: “N/A”, “flask”: “N/A”, “kombu”: {“enabled”: false, “instrumented”: false, “module_available”: true, “module_version”: “4.2.2.post1”, “module_imported”: true, “config”: null}, “starlette”: “N/A”, “falcon”: “N/A”, “pylons”: “N/A”, “pyramid”: “N/A”, “logging”: “N/A”, “pynamodb”: “N/A”, “pyodbc”: “N/A”}}
2020-12-10 17:13:27,048 WARNING - DATADOG TRACER DIAGNOSTIC - Agent not reachable. Exception raised: [Errno 111] Connection refused

Need help
#####IT4LIFE#####

Hi Aliou and welcome to the CommCare forum! Thanks for your post, this is something I was just looking into as well.

The log messages are actually just warnings about the Datadog configuration and not critical errors. They should not impact the running of the system at all. However they are very annoying so I’ve made a change that will disable the logs: https://github.com/dimagi/commcare-hq/pull/28871

Until that PR is merged you can set the DD_TRACE_STARTUP_LOGS environment variable manually which will stop the logs:

export DD_TRACE_STARTUP_LOGS=false