<commit_before>"""
WSGI config for snippets project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'snippets.settings')  # NOQA

from django.core.wsgi import get_wsgi_application

import newrelic.agent
from decouple import config
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry

application = get_wsgi_application()

application = Sentry(application)

# Add NewRelic
newrelic_ini = config('NEW_RELIC_CONFIG_FILE', default='newrelic.ini')
newrelic_license_key = config('NEW_RELIC_LICENSE_KEY', default=None)
if newrelic_ini and newrelic_license_key:
    newrelic.agent.initialize(newrelic_ini)
    application = newrelic.agent.wsgi_application()(application)<commit_msg>[Fix #994] Fix NewRelic reporting.<commit_after>"""
WSGI config for snippets project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import newrelic.agent
newrelic.agent.initialize('newrelic.ini')

import os  # NOQA
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'snippets.settings')  # NOQA

from django.core.wsgi import get_wsgi_application  # NOQA
application = get_wsgi_application()

from raven.contrib.django.raven_compat.middleware.wsgi import Sentry  # NOQA
application = Sentry(application)
{'fraction_non_alphanumeric': 0.09967213114754099, 'fraction_numerical': 0.0045901639344262295, 'mean_word_length': 6.164319248826291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4970681', 'n_tokens_mistral': 528, 'n_tokens_neox': 496, 'n_words': 114}