AWS X-Ray with Spring Cloud Sleuth

0

I'm trying to use Spring Cloud Sleuth with AWS X-Ray. When I am testing my API locally I can see the X-Amzn-Trace-Id header being picked up correctly by Spring Cloud Sleuth and being attached to my logs correctly.

The issue is I cannot see any requests being sent from my application to the xray-daemon which is running as a container locally.

Has anyone successfully got this working with the latest versions of spring cloud sleuth and zipkin-reporter-xray-udp to forward the requests to the xray-daemon? I have only been able to find guides/resources from 2019 but these are no longer relevant. I have configured the following bean and using spring-cloud-starter-sleuth 3.1.3 and zipkin-reporter-xray-udp 0.23.4.

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

I am running the X-Ray daemon using the following command

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
已提問 2 年前檢視次數 1217 次
1 個回答
0
已接受的答案

After coming back to this and adding spring-cloud-sleuth-zipkin 3.1.3 as a dependency I can see the records being forwarded to the xray-daemon

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南