Encoding and wire protocol for sending Zipkin spans to AWS X-Ray.
See reporter-xray-udp for instructions on setting up X-Ray reporting for an application.
This storage module performs three activites:
- Receives incoming zipkin spans
- Encodes received zipkin spans to X-Ray compatible segments
- Forwards the encoded X-Ray segments to a X-Ray daemon endpoint
The encoder is implemented by zipkin2.storage.xray_udp.UDPMessageEncoder
class.
Name | Source | Destination | Mandatory | Transformation | Reference |
---|---|---|---|---|---|
Origin | span.tags['aws.origin'] |
segment.origin |
No | Simple value mapped | Segment fields > Optional Segment Fields > origin |
In order to enable tracing of the URL and status code. The HttpTracing
needs to be built with a builder rather than .create
as the default implementation does not provide that information to the trace as it may contain sensitive information. The following code shows how to enable it as per #58 (comment)
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);
}
)
.clientResponseParser(
((response, context, span) -> {
HttpResponseParser.DEFAULT.parse(response, context, span);
HttpTags.STATUS_CODE.tag(response, span);
})
)
.build();