Giter Site home page Giter Site logo

kisslove / web-monitoring Goto Github PK

View Code? Open in Web Editor NEW
976.0 29.0 187.0 20.04 MB

前端监控,性能监控平台。前端监控平台专注于Web端体验数据监控。对网页健康状况的三个方面进行监测:页面打开速度(速度测量)、页面稳定性(JS错误)和外部服务调用成功率(API)。

Home Page: https://hubing.online

JavaScript 72.38% TypeScript 16.35% CSS 0.01% HTML 10.14% Pug 0.03% SCSS 1.04% Dockerfile 0.04% Shell 0.01%
web-application monitoring pagespeed jserrors api-service web-monitoring

web-monitoring's Introduction

web-monitoring

[功能列表]

  • 允许用户创建多个监测站点
  • 从不同维度统计用户访问情况
  • 自定义查询时间
  • 多种图表展示
  • 支持自定义上报(js错误,api请求,性能信息)
  • 用户访问路径追踪
  • 自定义阈值(注册用户)
  • 自动报警功能,发送报警邮件提醒(注册用户)

[技术支持]

  • 前端:Angular5+,ant-design
  • 后端:Nodejs+Express
  • 数据库:Mongoose+MongoDB
  • Docker:一键部署Docker环境

前端监控平台专注于 Web 端体验数据监控。监测 Web 页面的健康度的三个方面:

  • 页面打开速度(测速)
  • 页面稳定性(JS Error)
  • 外部服务调用成功率(API)

然后从不同纬度去分析用户体验。

  • 访问页面
  • 访问速度
  • API请求
  • 地理
  • 终端

参考:

http://fex.baidu.com/blog/2014/05/build-performance-monitor-in-7-days

阿里云前端监控

页面打开速度

网络耗时数据可以借助前面提到 Navigation Timing 接口获取,与之类似的还有Resource Timing,可以获取页面所有静态资源的加载耗时。通过此接口可以轻松获取 DNS、TCP、首字节、html 传输等耗时,Navigation Timing 的接口示意图如下所示:

file-list

API请求

默认情况下,使用XMLHTTP拦截用户请求,在请求成功/失败后,统计时间,上报请求。 用户可使用**__ml.api(api,success, time, code, msg)**手动上报。

 api:请求接口
 success:上传是否成功(true/false )
 time:耗时(ms)
 code:返回码
 msg:消息(string/object)

JS错误

默认情况下,使用window.onError去监听用户错误脚本,自动上报。 用户使用的有些前端框架会捕获js错误,错误信息不会抛至window.onError,这种情况需用户手动调用。 例如在Angular2+,在你的框架全局捕获错误的地方调用**__ml.error(errorObj)**

  export class MyErrorHandler implements ErrorHandler {
      handleError(error) {
        console.error(error);
        window.__ml && window.__ml.error && window.__ml.error(error.stack ||     error);
      }
    }
    @NgModule({
      declarations: [],
      imports: [],
      providers: [{ provide: ErrorHandler, useClass: MyErrorHandler }],
      bootstrap: []
    })
    export class AppModule { }

在Vue:

import Vue from 'vue'
const errorHandler = (error, vm)=>{
 console.error(error);
 window.__ml && window.__ml.error && window.__ml.error(error);
}
Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this);

如何使用(easy!!!)

网页地址:WEB-MONITOR

第一步:在监控站点中创建一个站点。

file-list

第二步:复制应用配置中的探针到你需要监控的站点(index.html)页面。大功告成!

file-list

贡献者支持

您的支持,是我们最大的前进动力。

支付宝:

file-list

微信:

file-list

web-monitoring's People

Contributors

hbpersonal123 avatar kisslove avatar xunge0613 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-monitoring's Issues

mongoDB可以提供一下吗?

fork下来自己用一下,发现没有数据库信息啊:mongodb://localhost:27017/monitor2
可以导出数据库信息,提供一下吗?谢谢

issues

请问有bundle.js 源码吗,谢谢!

前端Docker镜像优化

目前dockerhub存在的镜像连接后端服务的地址是固定的本地主机 localhost,这意味着使用此镜像的用户只能在本机使用,无法直接部署到服务器使用。

希望将镜像连接后端服务的地址改为例如 /api/v1等,这样使用者只需配置反向代理将前后端服务整合到同一域名下即可使用。

mogodb版本用的是哪一个?

(node:7908) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(node:7908) DeprecationWarning: The option reconnectTries is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6

ng 需要什么版本? 本地编译不起来

An unhandled exception occurred: Could not find the implementation for builder @angular-devkit/build-angular:browser See "C:\Users\ADMINI~1\AppData\Local\Temp\ng-2RxuJA\angular-errors.log" for further details. error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Msg聚类乱码问题

大佬,问个问题:

API请求--> Msg聚类 --> 显示乱码是啥问题呢,看了下,上报的时候就是乱码该怎么修改呢

一些新功能

网站流量监控、不同地理位置的访问人数、访问量最高的链接排行、访问链接的文件大小排行~
话说我看到的好多都是埋点实现的。。

代码使用问题

请问一下 我这边好像没有看到报错监听上报部分的代码,请问这个代码是不予提供的么orz

linux 下获取操作系统类型

你好,网站添加监控代码后,可以正常获取windows和MAC 等操作系统的访问记录,但是linux下的 bundle.js 执行 出错,具体如下:

谢谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.