I send my traces to Zipkin and I can tell I am setting the HTTP Path
But it does not map to XRay's Request URL.
Where can I do the mapping?
I am using the following images as per my answer on integrating Spring Cloud Sleuth with Amazon X-Ray
Looking through the code, I am using HttpTracing
from ZipKin brave libraries I am presuming that's what it is using to populate the data.
Digging around some more there seems to be an openzipkin/zipkin-aws#58 which sort of describes the issue
Looking through the code I may just need to alter the default tracing to add the additional details. Adding the following bean will make it configure to contain the necessary details.
@Bean
public HttpTracing httpTracing(Tracing tracing) {
return HttpTracing.newBuilder(tracing)
.serverRequestParser(
(req, context, span) -> {
HttpRequestParser.DEFAULT.parse(req, context, span);
HttpTags.URL.tag(req, context, span);
}
)
.serverResponseParser(
((response, context, span) -> {
HttpResponseParser.DEFAULT.parse(response, context, span);
HttpTags.STATUS_CODE.tag(response, span);
})
)
.clientRequestParser(
(req, context, span) -> {
HttpRequestParser.DEFAULT.parse(req, context, span);
HttpTags.URL.tag(req, context, span); // add the url in addition to defaults
}
)
.clientResponseParser(
((response, context, span) -> {
HttpResponseParser.DEFAULT.parse(response, context, span);
HttpTags.STATUS_CODE.tag(response, span);
})
)
.build();
}