Skip to content

Commit

Permalink
feat: 添加阿里应用实时监控
Browse files Browse the repository at this point in the history
  • Loading branch information
jo0ger committed Dec 24, 2019
1 parent 06228ba commit d719ccd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ module.exports = {
// { src: '@/plugins/baidu-stat', ssr: false },
{ src: '@/plugins/baidu-seo-push', ssr: false },
{ src: '@/plugins/sentry', ssr: false },
{ src: '@/plugins/ali-logger', ssr: false },
// { src: '@/plugins/behavior-trace', ssr: false },
{ src: '@/plugins/console-say-hi', ssr: false },
{ src: '@/plugins/particles', ssr: false },
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@jooger/word-counter": "^1.1.0",
"@nuxtjs/axios": "^5.0.0",
"@nuxtjs/pwa": "^2.6.0",
"alife-logger": "^1.8.3",
"bezier-easing": "^2.1.0",
"dayjs": "^1.7.5",
"fundebug-javascript": "^1.7.3",
Expand Down
27 changes: 27 additions & 0 deletions src/plugins/ali-logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Summary: 阿里前端实时监控
* File: /src/plugins/ali-logger.ts
* -----
* File Created: 2019-12-24 12:36:48, Tue
* Author: zhuzhiyang ([email protected])
* -----
* Last Modified: 2019-12-24 12:36:54, Tue
* Modified By: zhuzhiyang ([email protected]>)
*/

import BrowerLogger from 'alife-logger'

export default () => {
if (process.client) {
BrowerLogger.singleton({
pid: 'imvqlnwuad@99e6e9cf1dbf150',
appType: 'web',
imgUrl: 'https://arms-retcode.aliyuncs.com/r.png?',
sendResource: true,
enableLinkTrace: true,
behavior: true,
enableSPA: true,
useFmp: true
})
}
}
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,10 @@ ajv@^6.0.1, ajv@^6.1.0:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"

alife-logger@^1.8.3:
version "1.8.3"
resolved "https://registry.npmjs.org/alife-logger/-/alife-logger-1.8.3.tgz#1e7743ebeb3992e9a078ca57a26638ba4546c487"

alphanum-sort@^1.0.0:
version "1.0.2"
resolved "http://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
Expand Down

0 comments on commit d719ccd

Please sign in to comment.