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
gefragt vor 2 Jahren1217 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen