在OpenShift使用Jaeger对Spring Boot / Spring Cloud应用作分布式服务跟踪

本文介绍了如何在OpenShift环境中利用Jaeger对Spring Boot和Spring Cloud应用进行分布式服务跟踪。Jaeger作为OpenTracing实现,提供了从应用到Jaeger Agent或Collector的数据发送方式。在Spring Boot应用中,通过引入特定依赖即可实现追踪,而Spring Cloud应用则需要额外配置来监控OpenFeign调用。文章还提到了发送跟踪数据到本地、服务端Jaeger以及OpenShift的Jaeger的方法,并给出了配置参数和环境变量的示例。
摘要由CSDN通过智能技术生成

在OpenShift使用Jaeger对Spring Boot / Spring Cloud应用作分布式服务跟踪

前言

本文描述了在OpenShift中使用Jaeger对Spring Boot / Spring Cloud应用作分布式服务跟踪。

关于Jaeger

Jaeger是一个优秀的基于OpenTracing的分布式服务跟踪系统。

参见:

在Spring Boot应用中用Jaeger作服务跟踪

如果服务间依赖只用了RestTemplate,可以只引入opentracing-spring-jaeger-web-starter 依赖。

The opentracing-spring-jaeger-web-starter starter is convenience starter that includes both opentracing-spring-jaeger-starter and opentracing-spring-web-starter This means that by including it, simple web Spring Boot microservices include all the necessary dependencies to instrument Web requests / responses and send traces to Jaeger.

添加Maven依赖:

<dependency>
  <groupId>io.opentracing.contrib</groupId>
  <artifactId>opentracing-spring-jaeger-web-starter</artifactId>
  <version>3.2.2</version>
</dependency>

无需代码改动,已完成在应用添加OpenTracing Jaeger支持。

OpenTracing Jaeger的本地配置为:

opentracing:
  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值