Skip to content

Commit

Permalink
Merge pull request #362 from scieloorg/add_es_indices
Browse files Browse the repository at this point in the history
Remove o APM e Adiciona as dependencias do ES
  • Loading branch information
gitnnolabs authored Dec 9, 2024
2 parents 5f7bbf9 + 6a93c56 commit 0237e7d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
36 changes: 18 additions & 18 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,21 @@

# Elastic-APM # https://www.elastic.co/guide/en/apm/agent/python/current/django-support.html
# ------------------------------------------------------------------------------
ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)

INSTALLED_APPS += ["elasticapm.contrib.django"]

ELASTIC_APM = {
# Set the required service name. Allowed characters:
# a-z, A-Z, 0-9, -, _, and space
"SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
# Use if APM Server requires a secret token
"SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
# Set the custom APM Server URL (default: http://localhost:8200)
"SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
# Set the service environment
"ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
}

MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")
# ELASTIC_APM_DISABLE_SEND = env.bool("ELASTIC_APM_DISABLE_SEND", default=True)

# INSTALLED_APPS += ["elasticapm.contrib.django"]

# ELASTIC_APM = {
# # Set the required service name. Allowed characters:
# # a-z, A-Z, 0-9, -, _, and space
# "SERVICE_NAME": env("ELASTIC_APM_SERVICE_NAME", default="OCABR-SciELO"),
# # Use if APM Server requires a secret token
# "SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN", default=""),
# # Set the custom APM Server URL (default: http://localhost:8200)
# "SERVER_URL": env("ELASTIC_APM_SERVER_URL", default="http://siem.scielo.org:8200"),
# # Set the service environment
# "ENVIRONMENT": env("ELASTIC_APM_ENVIRONMENT", default="produciton"),
# }

# MIDDLEWARE.insert(0, "elasticapm.contrib.django.middleware.TracingMiddleware")
# MIDDLEWARE.insert(1, "elasticapm.contrib.django.middleware.Catch404Middleware")
6 changes: 6 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ langcodes==3.3.0 # https://pypi.org/project/langcodes/
# PyAlex
# ------------------------------------------------------------------------------
pyalex==0.14 # https://github.com/J535D165/pyalex

# Elastic
# ------------------------------------------------------------------------------
elastic-transport==8.15.1
elasticsearch==7.17.12
pyelasticsearch==1.4.1

0 comments on commit 0237e7d

Please sign in to comment.