awslabs / awslabs/aws-sdk-rust

X-Ray UDP Trace Client needed

Open
#642 5 comments 20 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Rust
Stars
3.3k
Forks
290
Avg merge
1d 12h
Merged PRs (30d)
3

Description

### Describe the feature

Support for UDP transport of X-Ray traces is needed to support the X-Ray daemon.

### Use Case

AWS Lambda provides a service-managed X-Ray daemon for batching X-Ray requests locally before forwarding them to the X-Ray service. The daemon listens on UDP port 2000 but there is no X-Ray UDP trace client. Therefore there is no way to leverage the local X-Ray daemon using this SDK.

Using the existing X-Ray client (HTTPS), it can take 40ms to 3000ms+ for each request (default Lambda timeout kill process at this point). Latency is highest for the initial request. The latency introduced by the HTTPS X-Ray client makes it unusable in Lambda functions. An extreme case of measuring a thing, altering a thing.

A workaround is to open a UDP socket bound to `0.0.0.0:0` and send to the address found in the `AWS_XRAY_DAEMON_ADDRESS` env var. For comparison, sending via a UDP socket takes less than 1ms.

### Proposed Solution

Provide a UDP-specific client for sending trace data.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### A note for the community

### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue, please leave a comment

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing HTTPS X-Ray client and its trace-send entry point, then review how the AWS_XRAY_DAEMON_ADDRESS value identifies the local daemon. The work is complete when a UDP-specific client can send trace data to the daemon on UDP port 2000 with the low latency described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, rust
Domain
api, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.