Permalink
Browse files

use oneapm replace to newrelic

  • Loading branch information...
1 parent 677514a commit 3ff1a90dd7121c42fc51254874df5af1ad9e5286 @alsotang alsotang committed Sep 15, 2015
Showing with 24 additions and 14 deletions.
  1. +5 −0 History.md
  2. +2 −2 app.js
  3. +2 −2 config.default.js
  4. +13 −8 newrelic.js → oneapm.js
  5. +2 −2 package.json
View
@@ -1,3 +1,8 @@
+2.1.0 / 2015-09-15
+==================
+
+* 使用 oneapm 代替 newrelic
+
2.0.1 / 2015-08-07
==================
View
@@ -8,8 +8,8 @@
var config = require('./config');
-if (!config.debug) {
- require('newrelic');
+if (!config.debug && config.oneapm_key) {
+ require('oneapm');
}
require('colors');
View
@@ -87,8 +87,8 @@ var config = {
// 是否允许直接注册(否则只能走 github 的方式)
allow_sign_up: true,
- // newrelic 是个用来监控网站性能的服务
- newrelic_key: 'yourkey',
+ // oneapm 是个用来监控网站性能的服务
+ oneapm_key: '',
// 下面两个配置都是文件上传的配置
@@ -1,25 +1,30 @@
-var config = require('./config');
/**
- * New Relic agent configuration.
+ * OneAPM agent configuration.
*
* See lib/config.defaults.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
+
+var config = require('./config');
+
exports.config = {
/**
* Array of application names.
*/
- app_name: [config.name],
+ app_name : [config.name],
/**
- * Your New Relic license key.
+ * Your OneAPM license key.
*/
- license_key: config.newrelic_key,
- logging: {
+ license_key : config.oneapm_key,
+ logging : {
/**
- * Level at which to log. 'trace' is most useful to New Relic when diagnosing
+ * Level at which to log. 'trace' is most useful to OneAPM when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
- level: 'info'
+ level : 'info'
+ },
+ transaction_events: {
+ enabled: true
}
};
View
@@ -1,6 +1,6 @@
{
"name": "nodeclub",
- "version": "2.0.1",
+ "version": "2.1.0",
"private": true,
"main": "app.js",
"description": "A Node.js bbs using MongoDB",
@@ -36,9 +36,9 @@
"moment": "2.9.0",
"mongoose": "4.1.3",
"multiline": "1.0.1",
- "newrelic": "1.19.2",
"node-uuid": "1.4.1",
"nodemailer": "0.3.43",
+ "oneapm": "1.2.8",
"passport": "0.1.18",
"passport-github": "0.1.5",
"pm2": "0.14.3",

0 comments on commit 3ff1a90

Please sign in to comment.