Skip to content

Commit 3ff1a90

Browse files
committed
use oneapm replace to newrelic
1 parent 677514a commit 3ff1a90

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

History.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.1.0 / 2015-09-15
2+
==================
3+
4+
* 使用 oneapm 代替 newrelic
5+
16
2.0.1 / 2015-08-07
27
==================
38

app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
var config = require('./config');
1010

11-
if (!config.debug) {
12-
require('newrelic');
11+
if (!config.debug && config.oneapm_key) {
12+
require('oneapm');
1313
}
1414

1515
require('colors');

config.default.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ var config = {
8787
// 是否允许直接注册(否则只能走 github 的方式)
8888
allow_sign_up: true,
8989

90-
// newrelic 是个用来监控网站性能的服务
91-
newrelic_key: 'yourkey',
90+
// oneapm 是个用来监控网站性能的服务
91+
oneapm_key: '',
9292

9393
// 下面两个配置都是文件上传的配置
9494

newrelic.js oneapm.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
var config = require('./config');
21
/**
3-
* New Relic agent configuration.
2+
* OneAPM agent configuration.
43
*
54
* See lib/config.defaults.js in the agent distribution for a more complete
65
* description of configuration variables and their potential values.
76
*/
7+
8+
var config = require('./config');
9+
810
exports.config = {
911
/**
1012
* Array of application names.
1113
*/
12-
app_name: [config.name],
14+
app_name : [config.name],
1315
/**
14-
* Your New Relic license key.
16+
* Your OneAPM license key.
1517
*/
16-
license_key: config.newrelic_key,
17-
logging: {
18+
license_key : config.oneapm_key,
19+
logging : {
1820
/**
19-
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
21+
* Level at which to log. 'trace' is most useful to OneAPM when diagnosing
2022
* issues with the agent, 'info' and higher will impose the least overhead on
2123
* production applications.
2224
*/
23-
level: 'info'
25+
level : 'info'
26+
},
27+
transaction_events: {
28+
enabled: true
2429
}
2530
};

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nodeclub",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"private": true,
55
"main": "app.js",
66
"description": "A Node.js bbs using MongoDB",
@@ -36,9 +36,9 @@
3636
"moment": "2.9.0",
3737
"mongoose": "4.1.3",
3838
"multiline": "1.0.1",
39-
"newrelic": "1.19.2",
4039
"node-uuid": "1.4.1",
4140
"nodemailer": "0.3.43",
41+
"oneapm": "1.2.8",
4242
"passport": "0.1.18",
4343
"passport-github": "0.1.5",
4444
"pm2": "0.14.3",

0 commit comments

Comments
 (0)