All Projects → chenmudu → open-telemetry-java-guides

chenmudu / open-telemetry-java-guides

Licence: MIT license
Java OpenTelemetry 测试指南 :Open-Telemetry-Java-Guides 案例,用于测试常用中间件支持及 Otel 相关组件的使用情况。 可观察性Sig: https://i.cloudnative.to/observability/

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to open-telemetry-java-guides

gateway
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (+40.3%)
Mutual labels:  observability, opentelemetry
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+552.24%)
Mutual labels:  observability, opentelemetry
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (+4014.93%)
Mutual labels:  observability, opentelemetry
aws-otel-lambda
AWS Distro for OpenTelemetry - AWS Lambda
Stars: ✭ 94 (+40.3%)
Mutual labels:  observability, opentelemetry
opentelemetry-tide
🔭🌊 OpenTelemetry integration for Tide
Stars: ✭ 18 (-73.13%)
Mutual labels:  otel, opentelemetry
geometrics
An opinionated library and set of guides for adding application tracing and metrics to a Phoenix application
Stars: ✭ 17 (-74.63%)
Mutual labels:  observability, opentelemetry
aws-o11y-recipes
recipes for observability solutions at AWS
Stars: ✭ 110 (+64.18%)
Mutual labels:  observability, opentelemetry
hubble-otel
Hubble adaptor for OpenTelemetry
Stars: ✭ 29 (-56.72%)
Mutual labels:  opentelemetry, opentelemetry-collector
opentelemetry-js-api
OpenTelemetry Javascript API
Stars: ✭ 75 (+11.94%)
Mutual labels:  observability, opentelemetry
aws-otel-java-instrumentation
AWS Distro for OpenTelemetry Java Instrumentation Library
Stars: ✭ 41 (-38.81%)
Mutual labels:  observability, opentelemetry
opentelemetry-prometheus-sidecar
The OpenTelemetry Prometheus sidecar runs alongside the Prometheus Server and exports your metrics data to an OpenTelemetry Protocol endpoint.
Stars: ✭ 13 (-80.6%)
Mutual labels:  opentelemetry, opentelemetry-collector
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+307.46%)
Mutual labels:  observability, opentelemetry
uptrace
Open source APM: OpenTelemetry traces, metrics, and logs
Stars: ✭ 1,187 (+1671.64%)
Mutual labels:  observability, opentelemetry
trouble-training
FullStack DDD/CQRS with GraphQL workshop including distributed tracing and monitoring. This shows the configuration from React frontend to .Net backend.
Stars: ✭ 271 (+304.48%)
Mutual labels:  observability, opentelemetry
opentelemetry-ruby
OpenTelemetry Ruby API & SDK, and related gems
Stars: ✭ 332 (+395.52%)
Mutual labels:  opentelemetry
skywalking-banyandb
An observability database aims to ingest, analyze and store Metrics, Tracing and Logging data.
Stars: ✭ 111 (+65.67%)
Mutual labels:  observability
policy-reporter
Monitoring and Observability Tool for the PolicyReport CRD with an optional UI.
Stars: ✭ 140 (+108.96%)
Mutual labels:  observability
DiscoveryPlatform
☀️ Nepxion DiscoveryPlatform is a platform for Nepxion Discovery with service governance, release orchestration, flow inspection, instance blacklist, gateway route 服务治理、蓝绿灰度编排、流量侦测、实例摘除、网关路由的平台
Stars: ✭ 63 (-5.97%)
Mutual labels:  opentelemetry
slab
An extensible Scala framework for creating monitoring dashboards.
Stars: ✭ 23 (-65.67%)
Mutual labels:  observability
esp-insights
ESP Insights: A remote diagnostics/observability framework for connected devices
Stars: ✭ 31 (-53.73%)
Mutual labels:  observability

Open-Telemetry-Java-Guides 案例工程

Open-Telemetry-Java-Guides案例,用于测试常用中间件支持及Otel相关组件的使用情况。关于更多Otel请访问Otel官网。

必读部分:数据展示前言环境准备参数设置启动测试服务结果观测测试服务列表测试环境测试库及框架列表.

🔈:希望各位先fork,后clone,这样关于我新提交的东西您就可以观测到。如果仅仅clone,我的最新提交您可能感知不到。 个人无偿测试和搭建不易,麻烦赏颗星星,感谢您。🙇‍。

数据展示

Otel-Col Info By ItSelf :

avatar

App-Trace Info By Jaeger:

avatar

App-Jvm-Metrics Info By Prometheus And Prometheus Gateway:

avatar

  • 关于业务日志, 借助对应的日志框架实现自定义即可,后将数据对接至Otel-Collector即可。

  • 中心化管控:Biz Logging, Trace, Metrics 较为方便。还未尝试Otel让 个人 最惊喜的Tail-Base-Smaple规则。

  • 关于Otel-Col的Tailed Base采样已尝鲜,值得注意的是,该功能的局限性:

    1. 基于尾部采样仅仅适合在单个 Collector 内可成功运行,多个Collector之间组成的集群官方及个人均未测试。

    2. 基于尾部采样的规则,目前仅仅适用于Trace,其实个人觉得更重要的是业务的Logging数据。

前言

  • Open Telemetry(下面简称 Otel(与Open Tracing 的Ot做区分))相关资料及文档

  • 搭建最小测试版的guides服务,仅仅是为了体验和测试Otel,故此数据仅存于内存中。

  • arch: avatar

环境准备

  1. 暂时不选择Otel-Collector,选择使用最小版Jaeger进行观测。关于如何安装All in One的Jaeger。

  2. 下载Otel-Javaagent.jar至磁盘目录下,关于Latest release ,目前最新版本为Beta 0.12.0

  3. 拉取Otel-Col-Docker-Image.

  4. 关于docker 安装相关组件请移步这儿

参数设置

  1. 设置VmOptions,指向磁盘中的otel-javaagent.jar的置放目录。
java -javaagent:path/to/opentelemetry-javaagent-all.jar
  1. 设置VmOptions,关于Exporter,otel默认为自己的OTLP Exporter,这里我们选择使用zipkin作为默认Exporter,其兼容jaeger的RestApi。使用Http方式上报至Jaeger的Collector中(也可以使用Otel-Collector)
// 省略此步骤,当你使用Otel-Collector的时候。
-Dotel.exporter=zipkin
  1. 向Environment variable添加参数对:
OTEL_RESOURCE_ATTRIBUTES=service.name=otel-simple-moudlename
  1. 关于Otel官方参数设置。

关于Otel-Collector

  1. Docker/Windows 安装 Otel-Collector即可。

  2. 向Environment variable添加参数对:

OTEL_RESOURCE_ATTRIBUTES=service.name=your service name
  1. 关于Otel-Collector-Design

启动测试服务

git clone 当前项目. 选择测试的模块(确保环境准备参数设置已经完成)。详情请进入子模块测试服务read me file,启动子模块。

结果观测

  1. 确保环境准备参数设置启动测试服务已按步完成。

  2. 访问Jaeger-Ui即可观测结果,按步完成后UI默认地址为:http://localhost:16686/。

测试服务列表

测试环境

  • JDK Version: 1.8.0_171 & Open-Jdk:11-2018.09.25

  • Otel Java Agent Version: 0.12.0 & 0.14.1

  • Otel Collector Win10 Version: 0.16.0

  • Otel Collector Docker Version: 0.16.0-Dev

  • Otel Collector Contrib Docker Version: 0.17.0-Dev

  • Maven Version: 3.3.9

  • IDEA Version: 2018.1.5 x64

  • OS Version: Win10

  • Docker Version: 19.03.13

  • JVM Info: Java HotSpot(TM) 64-Bit Server VM (25.171-b11, mixed mode)

  • Others:Prometheus, Prometheus Gateway, Jaeger All In One, Grafana ...

测试库及框架列表

Library/Framework Versions Test Result 官方最低版本支持
Servlet 4.0 Y 2.2+
WebMvc 5.1.15 Y 3.1+
WebFlux 5.1.15 Y 5.0+
RestTemplate(sync & async) 5.1.15 N/Y(错当rest temeplate为http client. 且不支持 async resttemplate.)故此推荐,如果生产使用RestTemplate,将其底层替换为HttpClient,包括连接池、其他参数等 官方无支持
ApacheHttpClient(sync & async) 4.5.12/4.1.4 Y 2.0+/1.9+ (not including 2.x yet)
HttpUrlConnection java8 Y Java 7+
OkHttp(sync & async) 3.6.0 Y 3.0+
JdbcMysqlConnector 8.0.22 Y
Spring-Data-Jdbc 2.1.14(1.0.17.RELEASE) Y 1.8+
Spring-Data-Jpa 2.1.14(2.1.17.RELEASE) Y 1.8+
Spring-Data-Rest 2.1.14(3.1.17.RELEASE) Y 1.8+
Spring-Data-Mongo 2.1.14(2.1.17.RELEASE) Y 1.8+
Spring-data-Redis 2.1.14(2.1.17.RELEASE) Y 1.8+
lettuce-core 5.1.8.RELEASE Y 4.0+ (not including 6.x yet)
Jedis-Client 2.9.0 Y 1.4+
Redisson-Client 0.0.0 N 还未测试 3.0+
Spring-data-Es 2.1.14(3.1.17.RELEASE) Y 1.8+
Spring-data-Neo4j 2.1.14(5.1.17.RELEASE) N 还未测试 1.8+
Spring-Rabbit 2.1.14(2.1.14.RELEASE) Y
Rabbit-Client 5.4.3 Y 2.7+
Spring-Kafka 2.1.13 Y
Kafka-Client 2.0.1 Y 0.11+
....... ..... Y

关于其他

  • 单个服务应当部署单独的Otel-Agent去收集你的Logging、Trace、Metrics。

  • 在每条业务架设对应的Otel-Col-Gateway去做总线收集较为妥当(划分依据参考自身业务)。

  • 至于更大的集群模式,请自行尝试。暂时切莫用于生产,待官方发布GA版本,个人将预先尝试。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].