diff --git a/TsaApi/local_settings_dev.py b/TsaApi/local_settings_dev.py
index 16f6ae8c6b8d0c37459947cfcf0102996e609a0e..7a37026a0b8d0693804345f56dc73fb10ccdccb2 100644
--- a/TsaApi/local_settings_dev.py
+++ b/TsaApi/local_settings_dev.py
@@ -48,6 +48,18 @@ GAS_PRICE = 1
 SENTRY_URL = 'http://2ec54beaab3b4459a1e5afadea070f98:92aee3f5d91e4e66996a3e0792985541@172.17.30.21:9000/54'
 
 MEMCACHED_HOST = '172.17.0.1'
-MEMCACHED_PORT = '11211'
+MEMCACHED_PORT = 11211  # TIENE QUE SER INT
 
 PENDING_TXS_MEMCACHED_KEY = 'pending_txs'
+
+TEST_MEMCACHED_HOST = MEMCACHED_HOST
+TEST_MEMCACHED_PORT = MEMCACHED_PORT
+
+TEST_PENDING_TXS_MEMCACHED_KEY = 'test_pending_txs'
+
+ELASTIC_APM = {
+    'SERVICE_NAME': 'TsaApi-dev',
+    'SERVER_URL': 'http://10.1.100.67:8200',
+    'DEBUG': True,
+}
+
diff --git a/TsaApi/local_settings_preprod.py b/TsaApi/local_settings_preprod.py
index 3e45e9f9be26a7e32e66285e5306c94df4be4ccb..d76d3f6369d5951e671d7bdb58f40ce84f73b195 100644
--- a/TsaApi/local_settings_preprod.py
+++ b/TsaApi/local_settings_preprod.py
@@ -32,4 +32,10 @@ PERMANENT_OTS_PREFIX = '1x'
 GAS = 250000
 GAS_PRICE = 1
 
-SENTRY_URL = 'http://aa30f3ecd3bb4923a7046f197da61e07:47cd9f9ea1e243f6a9f47e2aa40b85c3@10.1.100.118:9000/82'
\ No newline at end of file
+SENTRY_URL = 'http://aa30f3ecd3bb4923a7046f197da61e07:47cd9f9ea1e243f6a9f47e2aa40b85c3@10.1.100.118:9000/82'
+
+ELASTIC_APM = {
+    'SERVICE_NAME': 'TsaApi-pp',
+    'SERVER_URL': 'http://10.20.99.87:8200',
+    'DEBUG': True,
+}
diff --git a/TsaApi/local_settings_prod.py b/TsaApi/local_settings_prod.py
index 1c6ab2ce9a9d543a856d10736c2c9ff18f645cce..b75500a2eeb44c8042c0d9c3f6a41b9499b2d2d6 100644
--- a/TsaApi/local_settings_prod.py
+++ b/TsaApi/local_settings_prod.py
@@ -41,4 +41,10 @@ PERMANENT_OTS_PREFIX = '1x'
 GAS = 250000
 GAS_PRICE = 1
 
-SENTRY_URL = 'http://36f4f241a007447d8a4441a13055b110:136cb6d1af854b869d13610603fa7321@10.1.100.118:9000/84'
\ No newline at end of file
+SENTRY_URL = 'http://36f4f241a007447d8a4441a13055b110:136cb6d1af854b869d13610603fa7321@10.1.100.118:9000/84'
+
+ELASTIC_APM = {
+    'SERVICE_NAME': 'TsaApi',
+    'SERVER_URL': 'http://10.20.99.87:8200',
+    'DEBUG': False,
+}
diff --git a/TsaApi/settings.py b/TsaApi/settings.py
index e658e4fc32d08f1b3ace279ba4502c602555a248..7b4aa3202dc3dce1dee9f362ff2af74b4274f18e 100644
--- a/TsaApi/settings.py
+++ b/TsaApi/settings.py
@@ -24,11 +24,9 @@ import os
 import datetime
 import raven
 
-
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
-
 # Quick-start development settings - unsuitable for production
 # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
 
@@ -40,7 +38,6 @@ DEBUG = True
 
 ALLOWED_HOSTS = ['*']
 
-
 # Application definition
 
 INSTALLED_APPS = [
@@ -54,9 +51,12 @@ INSTALLED_APPS = [
     'raven.contrib.django.raven_compat',
     'corsheaders',
     'rest_framework_swagger',
+    'elasticapm.contrib.django'
+    'app'
 ]
 
 MIDDLEWARE = [
+    'elasticapm.contrib.django.middleware.TracingMiddleware',
     'django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
@@ -89,7 +89,6 @@ TEMPLATES = [
 
 WSGI_APPLICATION = 'TsaApi.wsgi.application'
 
-
 # Database
 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
 
@@ -100,7 +99,6 @@ DATABASES = {
     }
 }
 
-
 # Password validation
 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
 
@@ -125,6 +123,7 @@ AUTH_PASSWORD_VALIDATORS = [
 LANGUAGE_CODE = 'es'
 
 from django.utils.translation import ugettext_lazy as _
+
 LANGUAGES = (
     ('es', _('Spanish')),
 )
@@ -141,14 +140,11 @@ USE_L10N = True
 
 USE_TZ = True
 
-
 # Static files (CSS, JavaScript, Images)
 # https://docs.djangoproject.com/en/1.11/howto/static-files/
 
 STATIC_URL = '/static/'
 
-
-
 # Habilitar para permitir la autenticación
 REST_FRAMEWORK = {
     'DEFAULT_PERMISSION_CLASSES': (
@@ -164,10 +160,40 @@ REST_FRAMEWORK = {
 SENTRY_URL = 'http://2ec54beaab3b4459a1e5afadea070f98:92aee3f5d91e4e66996a3e0792985541@172.17.30.21:9000/54'
 
 MEMCACHED_HOST = ''
-MEMCACHED_PORT = ''
+MEMCACHED_PORT = 0  # OJO, TIENE QUE SER INT, sino REVIENTA MEMCACHED
 
 PENDING_TXS_MEMCACHED_KEY = 'pending_txs'
 
+TEST_MEMCACHED_HOST = ''
+TEST_MEMCACHED_PORT = ''
+
+TEST_PENDING_TXS_MEMCACHED_KEY = 'test_pending_txs'
+
+LOGGING = {
+    'version': 1,
+    'disable_existing_loggers': False,
+    'handlers': {
+        'file': {
+            'level': 'DEBUG',
+            'class': 'logging.FileHandler',
+            'filename': '/path/to/django/debug.log',
+        },
+    },
+    'loggers': {
+        'django': {
+            'handlers': ['file'],
+            'level': 'DEBUG',
+            'propagate': True,
+        },
+    },
+}
+
+ELASTIC_APM = {
+    'SERVICE_NAME' : 'TsaApi',
+    'SERVER_URL': 'http://10.1.100.67:8200',
+    'DEBUG': False,
+}
+
 try:
     from TsaApi.local_settings import *
 except ImportError as e:
@@ -175,4 +201,4 @@ except ImportError as e:
 
 RAVEN_CONFIG = {
     'dsn': SENTRY_URL,
-}
\ No newline at end of file
+}
diff --git a/requirements.txt b/requirements.txt
index bb7f8e894e7a2f639374d705555e1c7aca5302e8..aaa7cba7627db42049d00ca5648b355df214497b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -65,4 +65,5 @@ uritemplate==3.0.0
 urllib3==1.23
 wcwidth==0.1.7
 web3==4.5.0
-websockets==5.0.1
\ No newline at end of file
+websockets==5.0.1
+elastic-apm==3.0.0
\ No newline at end of file