Skip to content

Commit

Permalink
Merge pull request #980 from praekelt/feature/add-prom-metrics
Browse files Browse the repository at this point in the history
add prom metrics
  • Loading branch information
codiebeulaine committed Dec 12, 2018
2 parents 09676eb + 0600c00 commit d30c940
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions gem/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'django_prometheus',

'taggit',
'modelcluster',
Expand Down Expand Up @@ -148,6 +149,7 @@
SITE_ID = 1

MIDDLEWARE_CLASSES = [
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'molo.core.middleware.ForceDefaultLanguageMiddleware',
'django.middleware.locale.LocaleMiddleware',
Expand All @@ -174,6 +176,9 @@
'gem.middleware.CustomSessionRefresh',
]

MIDDLEWARE_CLASSES += [
'django_prometheus.middleware.PrometheusAfterMiddleware',
]
# Template configuration

# We have multiple layouts: use `base`, `malawi` , `springster` or `rwanda`
Expand Down Expand Up @@ -226,8 +231,14 @@
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

# SQLite (simplest install)
DATABASES = {'default': dj_database_url.config(
default='sqlite:///%s' % (join(BASE_DIR, 'db.sqlite3'),))}
DATABASES = {
'default': dj_database_url.config(
default='sqlite:///%s' % (join(PROJECT_ROOT, 'db.sqlite3')),
engine='django_prometheus.db.backends.sqlite3')
}

DATABASES['default']['TEST'] = {}
DATABASES['default']['TEST']['NAME'] = join(PROJECT_ROOT, 'db.sqlite3')

# PostgreSQL (Recommended, but requires the psycopg2 library and Postgresql
# development headers)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
molo.core==7.0.9
molo.core==7.1.0
molo.surveys==7.0.1
molo.commenting==7.0.1
molo.pwa==6.2.0
Expand Down

0 comments on commit d30c940

Please sign in to comment.