
jaegertracing/example-hotrod这是一个包含多个微服务的演示应用,展示了OpenTelemetry API和SDK的使用。它可以独立运行,但需要Jaeger后端来查看追踪数据。提供以下教程/演练:
自Jaeger v1.42.0起,此应用已升级为使用OpenTelemetry SDK进行追踪。
💥💥💥 试试Jaeger v2! 参见 cmd/jaeger。
docker compose运行所有组件docker-compose.ymlJAEGER_VERSION传递。否则docker compose将使用latest标签,首次下载镜像时没问题,但本地镜像仓库中的latest标签不会更新,可能导致运行过时(且可能不兼容)的Jaeger和HotROD应用版本。JAEGER_VERSION=1.52 docker compose -f path-to-yml-file updocker compose -f path-to-yml-file down关闭/清理bashkustomize build ./kubernetes | kubectl apply -f - kubectl port-forward -n example-hotrod service/example-hotrod 8080:frontend # 在另一个终端 kubectl port-forward -n example-hotrod service/jaeger ***:frontend # 清理 kustomize build ./kubernetes | kubectl delete -f -
访问Jaeger UI:http://localhost:***,HotROD应用:http://localhost:8080
一体化Jaeger后端打包为Docker容器,使用内存存储。
bashdocker run \ --rm \ --name jaeger \ -p4318:4318 \ -p***:*** \ -p***:*** \ jaegertracing/all-in-one:latest
Jaeger UI可通过http://localhost:***访问。
bashgit clone ***:jaegertracing/jaeger.git jaeger cd jaeger go run ./examples/hotrod/main.go all
bashdocker run \ --rm \ --link jaeger \ --env OTEL_EXPORTER_OTLP_ENDPOINT=[***] \ -p8080-8083:8080-8083 \ jaegertracing/example-hotrod:latest \ all
然后打开[***]
应用暴露指标,默认使用Go的expvar格式,也可通过-m prometheus标志启用Prometheus格式。
expvar:curl [***]curl [***]HotROD UI可以生成指向Jaeger UI的链接,以查找每个执行请求对应的追踪数据。默认使用标准Jaeger UI地址http://localhost:***,若Jaeger UI运行在其他地址,可通过-j <地址>标志自定义,例如:
go run ./examples/hotrod/main.go all -j [***]

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务