Git Product home page Git Product logo

sea-monitor-all's Introduction

sea-monitor

Stargazers over time

Stargazers over time

N9E java sdk,采集应用数据上报N9E collector 或transfer。

Overview

后端截图

报警截图

架构

sea-monitor默认情况下以SDK形式嵌入到应用,方便研发人员使用;

支持PUSH和Pull两种模式,push模式是异步上报到N9E-collector,pull模式需要自己采集日志

push方式(默认)

Pull方式(支持)

原理

  • 应用启动后,初始化SeaMonitor类,启动消息发送线程
  • 当调用SeaMonitor API时,数据点即Metrics,会放入队列,消息发送线程会周期性的将数据发送至远端
  • 在N9E monapi端定义告警策略,集成钉钉通知

工程结构

├── sea-monitor   // 监控SDK
├── sea-monitor-boot-starter // spring-boot工程集成
├── sea-monitor-boot-starter-demo  // spring-boot工程示例
└── sea-monitor-web-demo // 常规spring-web工程示例

Doc

支持的中间件以及API

API

更多请参考这里

单个指标

      MetricDTO metricDTO = new MetricDTO();
      metricDTO.setMetric(MetricEnum.HTTP_REQUEST_ERROR.getKey());
      metricDTO.setValue(1);
      metricDTO.setErrorFlag(true);
      metricDTO.setTraceIdFlag(true);
      SeaMonitor.logMetric(metricDTO);

统计指标

     SeaMonitor.logCount(MetricEnum.HTTP_REQUEST_ERROR_COUNT.getKey());

SPI扩展指标

适用于定制化周期性指标上报,统计周期1min

  • META-INF/service/目录下新建文件com.github.seaframework.monitor.heartbeat.StatusExtension
  • 实现接口com.github.seaframework.monitor.heartbeat.StatusExtension
  • META-INF/service/com.github.seaframework.monitor.heartbeat.StatusExtension文件中存放对应的实现类即可

参考资料

  • SDK的实现参考了CAT-SDK
  • 感谢N9E团队的支持

最后

您的支持是我最大的动力

sea-monitor-all's People

Watchers

 avatar

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.