Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit d355127

Browse files
silarsisOlivier Gambier
authored andcommitted
use default new relic environment variables
1 parent db9cda0 commit d355127

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

docker_registry/extras/newrelic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33

4-
def boot(ini, stage):
5-
if ini:
4+
def boot(config_file, license):
5+
if (config_file or license):
66
try:
77
import newrelic.agent
8-
newrelic.agent.initialize(ini, stage)
8+
newrelic.agent.initialize()
99
except Exception as e:
1010
raise Exception('Failed to init new relic agent %s' % e)

docker_registry/server/env.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
'GUNICORN_ACCESS_LOG_FILE': '"-"',
1919
'GUNICORN_ERROR_LOG_FILE': '"-"',
2020
'GUNICORN_OPTS': '[]',
21-
'NEW_RELIC_INI': '',
22-
'NEW_RELIC_STAGE': 'dev'
21+
'NEW_RELIC_LICENSE_KEY': '',
22+
'NEW_RELIC_CONFIG_FILE': '',
23+
'NEW_RELIC_ENVIRONMENT': 'dev'
2324
}
2425

2526

docker_registry/wsgi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
# start new relic if instructed to do so
1010
from .extras import newrelic
1111
from .server import env
12-
newrelic.boot(env.source('NEW_RELIC_INI'), env.source('NEW_RELIC_STAGE'))
12+
newrelic.boot(env.source('NEW_RELIC_CONFIG_FILE'),
13+
env.source('NEW_RELIC_LICENSE_KEY'))
1314

1415
from .extensions import factory
1516
factory.boot()

0 commit comments

Comments
 (0)