File tree Expand file tree Collapse file tree
python-ecosystem/inference-orchestrator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,8 @@ services:
181181 INTERNAL_API_SECRET : ${INTERNAL_API_SECRET:?INTERNAL_API_SECRET must be set in .env}
182182 # Redis connection for async analysis queue (DB 1 to isolate from session storage on DB 0)
183183 REDIS_URL : redis://redis:6379/1
184+ # New Relic APM — points to the mounted config file
185+ NEW_RELIC_CONFIG_FILE : /app/newrelic.ini
184186 networks :
185187 - codecrow-network
186188 volumes :
Original file line number Diff line number Diff line change 1111 python main.py --stdin # Process single request from stdin
1212"""
1313
14+ # ── New Relic APM — must be initialized before any other imports ─────────
15+ import os as _os
16+ _nr_config = _os .environ .get ('NEW_RELIC_CONFIG_FILE' )
17+ if _nr_config and _os .path .exists (_nr_config ):
18+ import newrelic .agent
19+ newrelic .agent .initialize (_nr_config )
20+ # ─────────────────────────────────────────────────────────────────────────
21+
1422import os
1523import sys
1624import logging
You can’t perform that action at this time.
0 commit comments