在您的本地环境中启动并运行jaeger
您的应用程序必须经过检测,然后才能将跟踪数据发送到Jaeger后端。 检查Client Libraries部分, 以获取有关如何使用OpenTracing API以及如何初始化和配置Jaeger跟踪器的信息。
All-in-one是用于快速本地测试的可执行文件,它使用内存存储组件启动Jaeger UI, collector, query, agent。 a 启动all-in-one最简单方法是使用发布到DockerHub的预构建映像(单个命令行)。
$ docker run -d --name jaeger\
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14268:14268 \
-p 9411:9411 \
jaegertracing/all-in-one:{{<currentVersion>}}
或从而二进制发行历史中运行jaeger-all-in-one(.exe)可执行文件:
$ jaeger-all-in-one --collector.zipkin.http-port=9411
然后,您可以导航到http://localhost:16686以访问Jaeger UI。
容器暴露以下端口:
accept zipkin.thrift over compact thrift protocol (deprecated, used by legacy clients only)
accept jaeger.thrift over compact thrift protocol
accept jaeger.thrift over binary thrift protocol
accept jaeger.thrift directly from clients
Zipkin compatible endpoint (optional)
Kubernetes和OpenShift
HotROD(按需乘车)是一个演示应用程序,由多个微服务组成 说明了OpenTracing API的用法。 博客文章中提供了教程/演练: 使用OpenTracing进行HotROD之旅。
它可以独立运行,但需要Jaeger后端才能查看跟踪。
使用具有OpenTracing集成的开源库来获取
与供应商无关的工具是免费的。
您需要在计算机上安装Go 1.11或更高版本才能从源代码运行。
从二进制发行档案中运行example-hotrod(.exe)可执行文件:
然后导航到"http://localhost:8080"
Collector服务公开了Zipkin兼容的REST API/api/v1/spans,该API同时接受Thrift和JSON。还有支持JSON和Proto的/api/v2/spans。 默认情况下,它是禁用的。可以使用--collector.zipkin.http-port = 9411启用。
ZipkinThrift IDL和ZipkinProto IDL文件可以在jaegertracing/jaeger-idl存储库中找到。 它们与openzipkin/zipkin-api兼容Thrift 和Proto。