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

Commit 0e69440

Browse files
committed
add new relic to code
1 parent 181542e commit 0e69440

File tree

9 files changed

+160
-4
lines changed

9 files changed

+160
-4
lines changed

Gruntfile.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ module.exports = function (grunt) {
201201
// This copies all the html and images into the build/ folder. css and js were done already.
202202
expand: true,
203203
cwd: 'app/',
204-
src: ['**/*.html', 'img/**', 'fonts/**', 'data/**', 'robots.txt'],
204+
src: ['**/*.html', 'img/**', 'fonts/**', 'data/**', 'robots.txt','js/newrelic.js'],
205205
dest: 'build/'
206206
},
207207
release: {
@@ -238,6 +238,21 @@ module.exports = function (grunt) {
238238
options: {
239239
force: true
240240
}
241+
},
242+
newrelic : {
243+
browser : {
244+
development : {
245+
licenseKey: "28fb2fc79c",
246+
applicationID: "4447207"
247+
}
248+
},
249+
server : {
250+
development : {
251+
APP_NAME: "testserver",
252+
LICENSE_KEY: "8f1eb71c599e28fb2b02e7e521488cbabb97174f",
253+
LOGGING_LEVEL : "trace"
254+
}
255+
}
241256
}
242257
});
243258

@@ -252,10 +267,12 @@ module.exports = function (grunt) {
252267
grunt.loadNpmTasks('grunt-aws');
253268
grunt.loadNpmTasks('grunt-contrib-compress');
254269
grunt.loadNpmTasks('grunt-contrib-jshint');
270+
grunt.loadTasks('./new_relic/tasks');
271+
grunt.loadTasks('./new_relic/server_tasks')
255272

256273
// The default tasks to run when you type: grunt
257-
grunt.registerTask('default', ['clean:build', 'replace:build', 'browserify:build', 'cssmin:dark', 'cssmin:light', 'cssmin:orange', 'copy:build', 'replace:cdn']);
258-
grunt.registerTask('build', ['clean:build', 'replace:build', 'browserify:build', 'cssmin:dark', 'cssmin:light', 'cssmin:orange', 'copy:build', 'replace:cdn']);
274+
grunt.registerTask('default', ['servernewrelic','newrelic','clean:build', 'replace:build', 'browserify:build', 'cssmin:dark', 'cssmin:light', 'cssmin:orange', 'copy:build', 'replace:cdn']);
275+
grunt.registerTask('build', ['servernewrelic','newrelic','clean:build', 'replace:build', 'browserify:build', 'cssmin:dark', 'cssmin:light', 'cssmin:orange', 'copy:build', 'replace:cdn']);
259276
//release tasks work out of build directory - build must be run first!
260277
grunt.registerTask('release', ['clean:release', 'uglify:release', 'copy:release']);
261278
grunt.registerTask('heroku', ['build']);

app/js/newrelic.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/js/resolvers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696

9797
var config = require('./config');
9898
var helper = require('./helper');
99+
require('./server_newrelic');
99100
/**
100101
* Represents the timeout of establishing socket connection.
101102
*

app/js/server_newrelic.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* New Relic agent configuration.
3+
*
4+
* See lib/config.defaults.js in the agent distribution for a more complete
5+
* description of configuration variables and their potential values.
6+
*/
7+
exports.config = {
8+
/**
9+
* Array of application names.
10+
*/
11+
app_name : ['development-testserver'],
12+
/**
13+
* Your New Relic license key.
14+
*/
15+
license_key : '8f1eb71c599e28fb2b02e7e521488cbabb97174f',
16+
logging : {
17+
/**
18+
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
19+
* issues with the agent, 'info' and higher will impose the least overhead on
20+
* production applications.
21+
*/
22+
level : 'info'
23+
}
24+
};

0 commit comments

Comments
 (0)