我们一直在玩Brave(Zipkin的Java实现)并成功添加了对REST和数据库调用的跟踪.我们还希望将RabbitMQ添加到跟踪中,并希望任何可能拥有类似经验的人都可以分享.
我们试图在网上找到一些东西,但似乎找不到我们可以添加到我们的兔子实现的拦截器.你能推荐一下吗?
提前致谢.
application.yml
Spring Boot/Cloud Zipkin服务器(可能是Zipkin Stream服务器)需要哪些确切的依赖关系和配置才能使用MySQL持久化跟踪数据?
我正在尝试使 OpenTelemetry 导出器与 OpenTelemetry 收集器一起使用。
我找到了这个OpenTelemetry 收集器演示。
所以我复制了这四个配置文件
到我的应用程序。
同样基于 open-telemetry/opentelemetry-js repo 中的这两个演示:
我想出了我的版本(抱歉有点长,由于缺少文档,很难设置最低工作版本):
.env
OTELCOL_IMG=otel/opentelemetry-collector-dev:latest
OTELCOL_ARGS=
Run Code Online (Sandbox Code Playgroud)
docker-compose.yml
version: '3.7'
services:
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268"
- "14250"
# Zipkin
zipkin-all-in-one:
image: openzipkin/zipkin:latest
ports:
- "9411:9411"
# Collector
otel-collector:
image: ${OTELCOL_IMG}
command: ["--config=/etc/otel-collector-config.yaml", "${OTELCOL_ARGS}"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector …
Run Code Online (Sandbox Code Playgroud) 我将使用Scala和Akka设计分布式系统.我想从集群聚合跟踪消息,并有可能在某种UI中查看它们.Zipkin是最好的解决方案,还是Flume(+一些包装?),还是其他什么?
即使Zipkin运行正常,Sleuth也不会将跟踪信息发送到Zipkin。我正在使用Spring 1.5.8.RELEASE,Spring Cloud Dalston.SR4,并且在我的微服务中添加了以下依赖项:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我的日志总是错误的:[FOOMS,2e740f33c26e286d,2e740f33c26e286d,false]
我的Zipkin依赖项是:
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
<scope>runtime</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
为什么我在懒惰的陈述中变得虚假而不是真实?虽然为所有调用正确生成了traceId和SpanId。我的Zipkin在端口9411中运行
我有使用 Spring Cloud OpenFeign 的多服务应用程序。现在我必须在该应用程序中使用 zipkin。我记得当我有没有 Feign 的应用程序时,我只是添加了 Sleuth 和 Zipkin starters 依赖项,并在端口 9411 上运行 zipkin 服务器。之后 Zipkin 运行良好.. 但是现在,当我在我的应用程序中使用 Feign 尝试相同时,我收到错误 500 “original请求是必需的”。我猜当 Sleuth 添加跟踪信息时,Feign 在标题方面存在一些问题。你能帮我解决这个问题吗?
我们正在建立微服务框架。
我们使用以下堆栈进行分布式跟踪。
以下是配置的完成方式
在gradle.build
(或 pom.xml)下面添加了启动依赖项
compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
compile 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
compile 'org.springframework.cloud:spring-cloud-starter-bus-kafka'
Run Code Online (Sandbox Code Playgroud)
添加一个 AlwaysSampler bean
@Bean
public Sampler defaultSampler() {
return Sampler.ALWAYS_SAMPLE;
}
Run Code Online (Sandbox Code Playgroud)
如果我们kafka
运行,事情会自动运行。
但是如果 kafka 没有运行,服务器不会启动 - 这主要是开发环境的情况。
如果我想停止这个,我必须注释掉这里提到的所有代码(因为我们在spring boot中使用starter依赖,它会按照我的理解自动配置)。
我们可以只对属性(或 yaml)文件进行一些更改,这样我就不需要去注释掉所有这些代码了吗?
或者可能是另一种禁用此功能而不做一些评论等的方法。
zipkin spring-boot microservices spring-cloud-sleuth distributed-tracing
关于 Zipkin 与 Prometheus 集成的可能性的小问题。
目前,我们已经有一个完全可用的 Zipkin 实例及其 Web UI。Zipkin 超级酷,一切都很好。
我们能够让所有微服务向 Zipkin 发送跟踪,并让 Zipkin 聚合它们。
我们还可以在UI等中搜索痕迹,超级酷。
另一方面,我们还有一个经过非常成熟的实战测试的 Prometheus Grafana,其中容器级别指标、应用程序级别指标和许多其他观察结果都已经存在于其中。
因此,目前我们必须在两个地方进行生产。我们的一切都集中在一个地方 Prometheus,还有这个超酷的 Zipkin。
我想知道,是否可以将 Prometheus 作为后端,或者使用某种 Prometheus 消耗 Zipkin 数据来在 Grafana 中显示,这样我们真的可以将所有内容集中在一个地方吗?
谢谢
我正在使用 Sleuth 和 Zipkin 进行分布式跟踪并遇到问题。
问题:使用 3.0.0 版本的 Spring Boot,TraceID 和 SpanID 不会打印在微服务日志中(并传递给 Zipkin)。
以下是我正在使用的版本:
应用程序属性:
spring.application.name=sleuthpoc2
spring.zipkin.base-url=http://localhost:9411/
spring.sleuth.sampler.probability=1.0
spring.zipkin.sender.type=WEB
Run Code Online (Sandbox Code Playgroud) 我想使用zipkin来描述传统程序的内部。
我使用“传统”一词,因为AFAIK zipkin用于在微服务环境中进行跟踪,其中一个请求由N个子请求计算得出。
我想分析我的python程序的性能。
我想跟踪完成的所有python方法调用和所有linux syscall。
如何跟踪python方法调用和linux syscalls以将跨度转换为zipkin?
即使不可行,我也很有趣如何做到这一点。我想学习zipkin的工作原理。
zipkin ×10
spring-boot ×4
spring ×3
distributed ×1
docker ×1
feign ×1
flume ×1
jaeger ×1
java ×1
javascript ×1
logging ×1
mysql ×1
opentracing ×1
profiling ×1
prometheus ×1
python ×1
rabbitmq ×1
scala ×1
spring-cloud ×1
trace ×1