Skip to content

Commit

Permalink
Enable Superset StatsD logging (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and lyft-buildnotify committed Nov 10, 2017
1 parent d1fb15e commit 30c3eb0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion superset_config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""Config file for Superset"""
import os

from flask_appbuilder.security.manager import AUTH_OAUTH
from flask_appbuilder.security.sqla.manager import SecurityManager

from superset import StatsDLogger

ENV = os.getenv("APPLICATION_ENV")

ROW_LIMIT = 5000
SUPERSET_WORKERS = 4

Expand All @@ -14,13 +19,16 @@
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
if os.getenv("APPLICATION_ENV") in ('production', 'staging'):
if ENV in ('production', 'staging'):
SQLALCHEMY_DATABASE_URI = 'mysql://{user}:{password}@{host}:5432/{database}'.format(
user=os.getenv("CREDENTIALS_SUPERSET_USERNAME"),
password=os.getenv("CREDENTIALS_SUPERSET_PASSWORD"),
host=os.getenv("CREDENTIALS_INCENTIVES_HOST"),
database=os.getenv("CREDENTIALS_SUPERSET_DATABASE"))

STATS_LOGGER = StatsdStatsLogger(
host='localhost', port=8125, prefix='superset_' + ENV)

# Flask-WTF flag for CSRF
CSRF_ENABLED = True

Expand Down

0 comments on commit 30c3eb0

Please sign in to comment.