在 Spring Cloud Sleuth 上使用 AWS X-Ray

0

【以下的问题经过翻译处理】 我正在尝试使用Spring Cloud Sleuth和AWS X-Ray。当我本地测试我的API时,我可以看到X-Amzn-Trace-Id标头被Spring Cloud Sleuth正确捕获并正确附加到我的日志中。

问题在于,我无法看到应用程序向本地运行的xray-daemon发送的任何请求。

有没有人成功地使用最新版本的spring cloud sleuth和zipkin-reporter-xray-udp来将请求转发到xray-daemon?我只能找到来自2019年的指南/资源,但这些已不再相关。我已配置以下bean,并使用spring-cloud-starter-sleuth 3.1.3和zipkin-reporter-xray-udp 0.23.4。

@Bean(ZipkinAutoConfiguration.REPORTER_BEAN_NAME) 
Reporter<Span> myReporter() { 
    return XRayUDPReporter.create(); 
}

我正在使用以下命令运行X-Ray守护程序。

docker run -d -v ~/.aws/:/root/.aws/:ro -e AWS_REGION=us-west-2 --name xray-daemon -p 2000:2000/udp public.ecr.aws/xray/aws-xray-daemon -o

profile picture
专家
已提问 5 个月前27 查看次数
1 回答
0

【以下的回答经过翻译处理】 已经添加 spring-cloud-sleuth-zipkin 3.1.3 作为一个依赖项后,我可以看到记录被转发到 xray-daemon。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则