Skip to content

Commit

Permalink
Update README.md (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
trajano committed Dec 18, 2023
1 parent 0df46f5 commit 9363776
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion storage/xray-udp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,35 @@ 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**](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-fields) > **Optional Segment Fields** > `origin` |
| Origin | `span.tags['aws.origin']` | `segment.origin` | No | Simple value mapped | [**Segment fields**](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-fields) > **Optional Segment Fields** > `origin` |

### HttpTracing

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 https://github.com/openzipkin/zipkin-aws/issues/58#issuecomment-1036995157

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();

0 comments on commit 9363776

Please sign in to comment.