instantiate newrelic in gunicorn_entry.py

This commit is contained in:
Kenneth Kehl
2025-07-29 08:15:43 -07:00
parent 814d08af2b
commit c8a559f0e5
4 changed files with 8 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ watch-frontend: ## Build frontend and watch for changes
.PHONY: run-flask
run-flask: ## Run flask
poetry run newrelic-admin run-program flask run -p 6012 --host=0.0.0.0
poetry run flask run -p 6012 --host=0.0.0.0
.PHONY: run-flask-bare
run-flask-bare: ## Run flask without invoking poetry so we can override ENV variables in .env

View File

@@ -2,4 +2,9 @@ from gevent import monkey
monkey.patch_all()
import newrelic.agent # noqa
newrelic.agent.initialize("./newrelic.ini")
from application import application # noqa

2
poetry.lock generated
View File

@@ -4207,4 +4207,4 @@ cffi = ["cffi (>=1.11)"]
[metadata]
lock-version = "2.1"
python-versions = "^3.13.2"
content-hash = "e750ecc1543890e5a499a3895b707c53ad19566e852708b48fefec6e65a129a4"
content-hash = "6f5a26be48841af3784f06d9c79c27a4bc7c2c8183da5d27eae2d371a2884258"

View File

@@ -23,7 +23,7 @@ gunicorn = {version = "==23.0.0", extras = ["gevent"]}
humanize = "~=4.12"
itsdangerous = "~=2.2"
jinja2 = "^3.1.6"
newrelic = "*"
newrelic = "^10.15.0"
pyexcel = "==0.7.3"
pyexcel-io = "==0.6.7"
pyexcel-ods3 = "==0.6.1"