Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add celery integration #93

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down
7 changes: 5 additions & 2 deletions superset_config.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
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 ddtrace import patch
from superset.stats_logger import StatsdStatsLogger

from hq_superset import flask_app_mutator, oauth
from hq_superset.const import OAUTH2_DATABASE_NAME
Expand Down Expand Up @@ -108,7 +109,9 @@
host='localhost', port=6379, key_prefix='superset_results'
)

patch(redis=True)
# Enable Datadog instrumentation for Celery and Redis
patch(celery=True, redis=True)
STATS_LOGGER = StatsdStatsLogger()

class CeleryConfig:
accept_content = ['pickle']
Expand Down