root: expose APM settings in helm chart
This commit is contained in:
parent
9021bbd5de
commit
b3b8cd807d
|
@ -22,6 +22,11 @@ config:
|
|||
# Log level used by web and worker
|
||||
# Can be either debug, info, warning, error
|
||||
log_level: warning
|
||||
# Optionally enable Elastic APM Support
|
||||
apm:
|
||||
enabled: false
|
||||
server_url: ""
|
||||
secret_token: ""
|
||||
|
||||
# This Helm chart ships with built-in Prometheus ServiceMonitors and Rules.
|
||||
# This requires the CoreOS Prometheus Operator.
|
||||
|
|
|
@ -21,3 +21,7 @@ data:
|
|||
message_queue_db: 1
|
||||
error_reporting: {{ .Values.config.error_reporting }}
|
||||
log_level: "{{ .Values.config.log_level }}"
|
||||
apm:
|
||||
enabled: {{ .Values.config.apm.enabled }}
|
||||
server_url: "{{ .Values.config.apm.server_url }}"
|
||||
secret_token: "{{ .Values.config.apm.server_token }}"
|
||||
|
|
|
@ -14,6 +14,11 @@ config:
|
|||
# Log level used by web and worker
|
||||
# Can be either debug, info, warning, error
|
||||
log_level: warning
|
||||
# Optionally enable Elastic APM Support
|
||||
apm:
|
||||
enabled: false
|
||||
server_url: ""
|
||||
secret_token: ""
|
||||
|
||||
# This Helm chart ships with built-in Prometheus ServiceMonitors and Rules.
|
||||
# This requires the CoreOS Prometheus Operator.
|
||||
|
|
|
@ -281,6 +281,19 @@ if not DEBUG and _ERROR_REPORTING:
|
|||
release="passbook@%s" % __version__,
|
||||
)
|
||||
|
||||
_APM_ENABLED = CONFIG.y("apm.enabled", True)
|
||||
if _APM_ENABLED:
|
||||
INSTALLED_APPS.append("elasticapm.contrib.django")
|
||||
ELASTIC_APM = {
|
||||
"CLOUD_PROVIDER": False,
|
||||
"DEBUG": DEBUG,
|
||||
"SERVICE_NAME": "passbook",
|
||||
"SERVICE_VERSION": __version__,
|
||||
"SECRET_TOKEN": CONFIG.y("apm.secret_token", ""),
|
||||
"SERVER_URL": CONFIG.y("apm.secret_token", "http://localhost:8200"),
|
||||
}
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
||||
|
||||
|
|
Reference in a new issue