From 73ffacc79287bd342330157ca990e59ca8b9d956 Mon Sep 17 00:00:00 2001 From: Zandre Engelbrecht Date: Thu, 21 Nov 2024 11:41:17 +0200 Subject: [PATCH 1/3] add new dependency --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f27bc47..5e69677 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ 'sentry-sdk[flask]==1.39.2', 'Werkzeug==2.3.3', 'WTForms==2.3.3', + 'ddtrace==2.17.0rc2' ], extras_require={ 'dev': [ From 3f2e92152bdc01340fd5e1fdc26e5a5a78373b88 Mon Sep 17 00:00:00 2001 From: Zandre Engelbrecht Date: Thu, 21 Nov 2024 11:50:25 +0200 Subject: [PATCH 2/3] patch celery and redis --- superset_config.example.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/superset_config.example.py b/superset_config.example.py index 282863d..84a3b05 100644 --- a/superset_config.example.py +++ b/superset_config.example.py @@ -9,9 +9,13 @@ import sentry_sdk from cachelib.redis import RedisCache from celery.schedules import crontab +from ddtrace import patch from flask_appbuilder.security.manager import AUTH_DB, AUTH_OAUTH from sentry_sdk.integrations.flask import FlaskIntegration +from superset.stats_logger import StatsdStatsLogger + + from hq_superset import flask_app_mutator, oauth from hq_superset.const import OAUTH2_DATABASE_NAME @@ -105,6 +109,9 @@ host='localhost', port=6379, key_prefix='superset_results' ) +# Enable Datadog instrumentation for Celery and Redis +patch(celery=True, redis=True) +STATS_LOGGER = StatsdStatsLogger() class CeleryConfig: accept_content = ['pickle'] From 7e7e26efc5d16624bec18cf3423cb726013daeb3 Mon Sep 17 00:00:00 2001 From: Zandre Engelbrecht Date: Fri, 22 Nov 2024 16:10:26 +0200 Subject: [PATCH 3/3] new dependency --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5e69677..cff423f 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,8 @@ 'sentry-sdk[flask]==1.39.2', 'Werkzeug==2.3.3', 'WTForms==2.3.3', - 'ddtrace==2.17.0rc2' + 'ddtrace==2.17.0rc2', + 'statsd==4.0.1' ], extras_require={ 'dev': [