Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 8f95093

Browse files
committed
move new relic configuration parameters to dev-local.sh / dev-local.bat
1 parent 0e69440 commit 8f95093

File tree

6 files changed

+29
-25
lines changed

6 files changed

+29
-25
lines changed

Gruntfile.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ module.exports = function (grunt) {
242242
newrelic : {
243243
browser : {
244244
development : {
245-
licenseKey: "28fb2fc79c",
246-
applicationID: "4447207"
245+
licenseKey: process.env.NEWRELIC_BROWSER_LICENSCEKEY,
246+
applicationID: process.env.NEWRELIC_BROWSER_APPLICATIONID
247247
}
248248
},
249249
server : {
250250
development : {
251-
APP_NAME: "testserver",
252-
LICENSE_KEY: "8f1eb71c599e28fb2b02e7e521488cbabb97174f",
253-
LOGGING_LEVEL : "trace"
251+
APP_NAME: process.env.NEWRELIC_SERVER_APPNAME,
252+
LICENSE_KEY: process.env.NEWRELIC_SERVER_LICENSE_KEY,
253+
LOGGING_LEVEL : process.env.NEWRELIC_SERVER_LOGGING_LEVEL
254254
}
255255
}
256256
}

app/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// global arena object
2121
var arena = {};
2222
</script>
23+
<script src="@@STATIC_FILE_HOST/js/newrelic.js"></script>
2324
<script src="@@STATIC_FILE_HOST/js/bundle.js"></script>
2425

2526
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

config/dev-local.bat

+10-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,13 @@ set CHALLENGE_ADVERTISING_INTERVAL=5000
8585
set CHALLENGE_ADVERTISING_UPDATE=300000
8686

8787
:: The TopCoder host name
88-
set TC_HOSTNAME=http://www.topcoder.com
88+
set TC_HOSTNAME=http://www.topcoder.com
89+
90+
::The New Relic Browser KEY
91+
set NEWRELIC_BROWSER_APPLICATIONID='4447207'
92+
set NEWRELIC_BROWSER_LICENSCEKEY='28fb2fc79c'
93+
94+
::The New Relic Server KEY
95+
set NEWRELIC_SERVER_APPNAME='testserver'
96+
set NEWRELIC_SERVER_LICENSE_KEY='8f1eb71c599e28fb2b02e7e521488cbabb97174f'
97+
set NEWRELIC_SERVER_LOGGING_LEVEL='trace'

config/dev-local.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,12 @@ export CHALLENGE_ADVERTISING_INTERVAL=5000
9090
export CHALLENGE_ADVERTISING_UPDATE=300000
9191

9292
# The TopCoder host name
93-
export TC_HOSTNAME=http://www.topcoder.com
93+
export TC_HOSTNAME=http://www.topcoder.com
94+
95+
#The New Relic Browser KEY
96+
export NEWRELIC_BROWSER_APPLICATIONID='4447207'
97+
export NEWRELIC_BROWSER_LICENSCEKEY='28fb2fc79c'
98+
#The New Relic Server KEY
99+
export NEWRELIC_SERVER_APPNAME='testserver'
100+
export NEWRELIC_SERVER_LICENSE_KEY='8f1eb71c599e28fb2b02e7e521488cbabb97174f'
101+
export NEWRELIC_SERVER_LOGGING_LEVEL='trace'

new_relic/server_tasks/grunt-newrelic.js

+3-11
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,10 @@
33
module.exports = function(grunt) {
44
grunt.registerTask("servernewrelic", "generate a newrelic.js file", function(environment) {
55

6-
var environment;
7-
8-
if (process.env.NODE_ENV == null) {
9-
environment = "development"
10-
}else{
11-
environment = process.env.NODE_ENV
12-
}
13-
146
try {
157
var target = grunt.config.get('newrelic'),
16-
config_path = target.server[environment],
17-
app_name = "app_name : ['" + environment + "-" + config_path.APP_NAME + "']",
8+
config_path = target.server["development"],
9+
app_name = "app_name : ['development" + "-" + config_path.APP_NAME + "']",
1810
license_key = "license_key : '" + config_path.LICENSE_KEY + "'",
1911
logging_level = "level : " + config_path.LOGGING_LEVEL + "'";
2012

@@ -41,4 +33,4 @@ module.exports = function(grunt) {
4133
grunt.log.ok("Unable to write newrelic.js");
4234
}
4335
});
44-
};
36+
};

new_relic/tasks/grunt-newrelic.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ module.exports = function(grunt) {
55
grunt.registerTask("newrelic", "generate a newrelic.js file", function() {
66
var environment;
77

8-
if (process.env.NODE_ENV == null) {
9-
environment = "development"
10-
}else{
11-
environment = process.env.NODE_ENV
12-
}
13-
148
try {
159
var target = grunt.config.get('newrelic'),
16-
config_path = target.browser[environment],
10+
config_path = target.browser["development"],
1711
applicationID = 'applicationID : "' + config_path.applicationID + '"',
1812
license_key = 'license_key : "' + config_path.licenseKey + '"';
1913
}

0 commit comments

Comments
 (0)