A java apm agent based on skywalking and open-telemetry.

Overview

Hermes是提供给Java应用使用的Apm解决方案。

  • 基于Apache Skywalking Agent Core.

    1. 复用了对于byte-buddy的封装
    2. 复用了logging日志模块
    3. 复用了config配置
    4. 复用了BootService
    5. 做了一些优化定制
  • Tracing协议基于Open-telemetry.

    1. Skywalking在实现Open-tracing的时候做了一些选择。考虑到OAP对于异步Span的处理,会让一整个TraceSegment完全结束后再上报,有一定的内存压力(弃用该策略不是因为它不好,只是选择不同)。
    2. Open-telemetry相对来说对于内存的使用会小一些,每个Span结束后就会立刻上报。
    3. Open-telemetry的baggage相对难用,因此本项目自行实现了baggage.
    4. 开源项目对于Open-telemetry的兼容性较好,CNCF成员,未来可期。
  • 插件.

    1. elasticsearch: 实现了elasticsearch-rest-client的插件
    2. lettuce5: 实现了lettuce5的插件,可监控对redis的操作
    3. jdbc8: 实现了jdbc8的插件,可监控对mysql的操作(该插件的实现是搭配了mybatis5的,单独使用可能有问题)
    4. threading: 增强了ThreadPoolExecutorForkJoinTask,实现跨线程的链路追踪
    5. TODO: SpringMVC、Spring Service、RocketMQ、MyBatis...
  • UI

    1. 阿里云链路追踪可接受jaeger协议的数据,链路图表功能不错,本项目使用阿里云链路追踪做UI
    2. 阿里云指标计算和展示需要另外的服务。本项目暂未加上指标采集上报。
    3. elastic-apm兼容原生Open-telemetry协议,图表非常好看,但是需要部署一个elastic-apm-server,架构相对复杂。
    4. 阿里云链路追踪UI展示:img_1.pngimg_2.pngimg_3.png img_4.pngimg_5.pngimg_6.pngimg_7.png
  • 配置

    1. 应用名和环境
      1. hermes.app.name: 应用名
      2. hermes.app.env: 环境(例如: dev、test、pre、pro)
    2. 阿里云链路追踪
      1. 需要开通阿里云链路追踪服务
      2. 查看接入点信息。img.png
      3. 配置接入点信息
        1. 打开HermesSpanExporter
        2. 修改of方法里面的host为你的接入点。例如:host=tracing-analysis-dc-us-east-1.aliyuncs.com
        3. 修改of方法里面的auth为上图中的token字段(全部复制过来,token类似123@xxxx_123@yyy)
    3. 跨线程
      1. 修改Config.Plugin.JdkThreading.THREAD_CLZ_PREFIXES的配置,加上你的项目包名前缀,比如com.taobao.buy2
  • 安装

    1. 将该项目下载到本地
    2. 执行mvn clean install -Dmaven.test.skip=true
    3. mac用户将会在桌面上看到一个hermes-agent目录(windows用户请修改hermes-parent.pom、hermes-plugin.pom的相关属性)
    4. 执行java -javaagent:/path/to/hermes-agent/hermes-agent.jar -Dhermes.app.name=ur-app-name -Dhermes.app.env=dev -server -jar /path-to-your-app/app.jar启动你的应用
You might also like...

Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

Oct 4, 2022

Java based open source static site/blog generator for developers & designers.

JBake JBake is a Java based open source static site/blog generator for developers. Documentation Full documentation is available on jbake.org. Contrib

Dec 30, 2022

This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of David Schablowsky

This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of David Schablowsky

Mustang Mach-E Widget for Android Intro This app/widget is based on the work of Anthony (tonesto7), which is in turn based on the earlier work of Davi

Nov 15, 2022

A Text Based, Turn-Based, Strategy Game to be played in console

ConsoleGame A Text Based, Turn-Based, Strategy Game to be played in console. Feel free to fix any retardation in my code (meaning bugs, stupid/spaghet

Jul 17, 2022

An Open-Source repository 🌎 that contains all the Data Structures and Algorithms concepts and their implementation, programming questions and Interview questions

An Open-Source repository 🌎 that contains all the Data Structures and Algorithms concepts and their implementation, programming questions and Interview questions

An Open-Source repository 🌎 that contains all the Data Structures and Algorithms concepts and their implementation, programming questions and Interview questions. The main aim of this repository is to help students who are learning Data Structures and Algorithms or preparing for an interview.

Dec 29, 2022

Free and 100% open source Progressive Java Runtime for modern Java™ deployments supported by a leading OpenJDK contributor

BellSoft Liberica JDK is a build of OpenJDK that is tested and verified to be compliant with the Java SE specification using OpenJDK Technology Compat

Dec 22, 2022

Drifty is an open-source interactive File Downloader system built with java. It is currently available in CLI mode and has the GUI version under active development.

Drifty is an open-source interactive File Downloader system built with java. It is currently available in CLI mode and has the GUI version under active development.

Drifty Drifty is an open-source interactive File Downloader system built using Java. It takes the link to the file, the directory where it needs to be

Dec 24, 2022

Java - Packet Analyzer Application based on Java, Networking and Swing UI

Network-Packet-Tracer-using-Java Java - Packet Analyzer / Sniffing System Application based on Java, Networking and Swing UI Java - Packet Analyzer Ap

Feb 3, 2022

Hcode Online Judge(HOJ):An open source online judge system base on SpringBoot, Springcloud Alibaba and Vue.js !

Hcode Online Judge(HOJ):An open source online judge system base on SpringBoot, Springcloud Alibaba and Vue.js !

Hcode Online Judge(HOJ) 前言 基于前后端分离,分布式架构的在线测评平台(hoj),前端使用vue,后端主要使用springboot,redis,mysql,nacos等技术。 在线Demo:https://hdoi.cn 在线文档:https://www.hcode.top/

Dec 31, 2022
Releases(release/v1.0.0)
Owner
道君
道君
A simple telemetry dashboard for DiRT Rally 2.0

Telemetry Dashboard for DiRT Rally 2.0 (WIP) Displays Current gear Current speed Steering wheel position Throttle, brake and clutch pedals input Engin

João Gabriel Gouveia 2 Sep 13, 2022
基于SpringCloud2.1的微服务开发脚手架,整合了spring-security-oauth2、nacos、feign、sentinel、springcloud-gateway等。服务治理方面引入elasticsearch、skywalking、springboot-admin、zipkin等,让项目开发快速进入业务开发,而不需过多时间花费在架构搭建上。持续更新中

快速开始 先决条件 首先本机先要安装以下环境,建议先学习了解springboot和springcloud基础知识。 git java8 maven 开发环境搭建 linux和mac下可在项目根目录下执行 ./install.sh 快速搭建开发环境。如要了解具体的步骤,请看如下文档。 具体步骤如下:

zhoutaoo 7.9k Jan 6, 2023
APM, Application Performance Monitoring System

Apache SkyWalking SkyWalking: an APM(application performance monitor) system, especially designed for microservices, cloud native and container-based

The Apache Software Foundation 21k Jan 9, 2023
Java agent that enables class reloading in a running JVM

Welcome to Spring-Loaded What is Spring Loaded? Spring Loaded is a JVM agent for reloading class file changes whilst a JVM is running. It transforms c

Spring 2.7k Dec 26, 2022
A Java agent that disables platform features you don't use, before an attacker uses them against you.

aegis4j Avoid the NEXT Log4Shell vulnerability! The Java platform has accrued a number of features over the years. Some of these features are no longe

Daniel Gredler 14 Jan 11, 2022
A tool which enhances your pojo, powered by java-agent.

A tool which enhances your pojo, powered by java-agent.

K.G. Wang 5 Oct 8, 2022
An example spring boot app to try out with a Parca Agent deployment.

Spring boot example This repo is an example for how a Java application can be profiled with Parca Agent. First deploy Parca and Parca Agent as usual,

Parca 1 Mar 9, 2022
Deploys an agent to fix CVE-2021-44228 (Log4j RCE vulnerability) in a running JVM process

-- This repository has been archived -- Further development of this tool will continue at corretto/hotpatch-for-apache-log4j2. Thanks for sharing, com

Volker Simonis 108 Dec 23, 2021
An agent to hotpatch the log4j RCE from CVE-2021-44228.

Log4jHotPatch This is a tool which injects a Java agent into a running JVM process. The agent will attempt to patch the lookup() method of all loaded

null 493 Dec 13, 2022