...
|
...
|
@@ -6,14 +6,16 @@ |
|
|
|
|
|
'use strict';
|
|
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
const isTest = process.env.NODE_ENV === 'test';
|
|
|
|
|
|
//
|
|
|
const config = {
|
|
|
app: 'yoho-apm',
|
|
|
appVersion: '0.0.1', // 调用api的版本
|
|
|
port: 6003,
|
|
|
siteUrl: '//shop.yohobuy.com',
|
|
|
cookieDomain: '.yohobuy.com',
|
|
|
domains: [/yohobuy\.com^/],
|
|
|
loggers: {
|
|
|
infoFile: {
|
|
|
close: true,
|
...
|
...
|
@@ -44,5 +46,28 @@ const config = { |
|
|
}
|
|
|
};
|
|
|
|
|
|
if (isProduction) {
|
|
|
Object.assign(module.exports, {
|
|
|
report: {
|
|
|
host: 'influxdblog.web.yohoops.org',
|
|
|
db: 'web-apm',
|
|
|
measurement: 'api-duration',
|
|
|
duration: 2000,
|
|
|
records: 10
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if (isTest) {
|
|
|
Object.assign(module.exports, {
|
|
|
report: {
|
|
|
host: 'influxdblog.web.yohoops.org',
|
|
|
db: 'web-apm',
|
|
|
measurement: 'api-duration',
|
|
|
duration: 2000,
|
|
|
records: 10
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
module.exports = config; |
...
|
...
|
|