Closed
Bug 1120492
Opened 11 years ago
Closed 11 years ago
Add New Relic to geo.mozilla.org
Categories
(Infrastructure & Operations Graveyard :: WebOps: Other, task)
Infrastructure & Operations Graveyard
WebOps: Other
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: osmose, Assigned: cliang)
Details
(Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/250] )
We added the code for supporting New Relic to geo.mozilla.org in bug 860495. It looks for the newrelic.ini file specified by the NEW_RELIC_CONFIG_FILE environment variable and the license key in the NEW_RELIC_LICENSE_KEY environment variable.
Can we install the New Relic python library on the geo.mozilla.org servers and configure it to send data to our New Relic instance?
| Reporter | ||
Comment 1•11 years ago
|
||
This will also require pulling the latest geodude code, and I'd like to try that on a staging environment first as the marketplace folks have made some changes for their instance that might require some changes to our instance as well. I forget; do we have a staging environment for geodude already?
| Assignee | ||
Updated•11 years ago
|
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/4186]
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/4186] → [kanban:https://webops.kanbanize.com/ctrl_board/2/250]
Comment 2•11 years ago
|
||
Also NEW_RELIC_APP_NAME environment variable is required for application name.
NEW_RELIC_APP_NAME and NEW_RELIC_LICENSE_KEY are required env variables. NEW_RELIC_CONFIG_FILE can be skipped and the included newrelic.ini will be used.
| Assignee | ||
Updated•11 years ago
|
Assignee: server-ops-webops → cliang
| Assignee | ||
Comment 3•11 years ago
|
||
I've installed the NewRelic python agent on the geo.mozilla.org dev server and added the usual environment variable to the Apache configuration file to set the NewRelicapplication name. However, even after restarting both the New Relic processes and Apache, it doesn't look like the python agent is being invoked by the app.
I'm wondering if your need to tweak the WSGI to pick up the NEWRELIC_PYTHON_INI file rather than the NEWRELIC_INI file. Looking at some of the other applications that are reporting correctly, the invocation looks something like:
try:
import newrelic.agent
except ImportError:
newrelic = False
if newrelic:
newrelic_ini = os.getenv('NEWRELIC_PYTHON_INI_FILE', False)
if newrelic_ini:
newrelic.agent.initialize(newrelic_ini)
else:
newrelic = False
I believe that the default ini file that is created by puppet (python.ini) already has the NewRelic license key embedded in it.
[1] SetEnv newrelic.app_name geo-dev.allizom.org
Comment 4•11 years ago
|
||
I pull requested with the changes suggested in #3. Once this is merged we can try again.
https://github.com/mozilla/geodude/pull/8
Comment 5•11 years ago
|
||
OK :cyliang can you pull the latest code and try again? We are reading NEWRELIC_PYTHON_INI_FILE env variable now.
Thanks!
| Assignee | ||
Comment 6•11 years ago
|
||
After some monkeying with dependencies, I believe the app is now reporting to New Relic:
https://rpm.newrelic.com/accounts/263620/applications/5842665
There's not much data but, then again, it looks like there aren't many requests sent to this server. I don't know if more code changes need to happen before additional data will show up -or- if more data will show up if there's more traffic sent to the dev environment.
Comment 7•11 years ago
|
||
I triggered some traffic to geo-dev.a.o and it NewRelic works as expected. Please proceed with prod deployemnt
| Assignee | ||
Comment 8•11 years ago
|
||
I installed the new NewRelic packages in stage and pulled the code changes from git. Data is now being reported to NewRelic for geo.mozilla.org:
https://rpm.newrelic.com/accounts/263620/applications/5867030
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•