Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Ray UDP Trace Client needed #642

Open
2 tasks
ahornbeck opened this issue Oct 19, 2022 · 3 comments
Open
2 tasks

X-Ray UDP Trace Client needed #642

ahornbeck opened this issue Oct 19, 2022 · 3 comments
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@ahornbeck
Copy link

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 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
@ahornbeck ahornbeck added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2022
@Velfi
Copy link
Contributor

Velfi commented Oct 24, 2022

Thanks for submitting this request @ahornbeck. This sounds like a pretty important feature for customers using XRay in Lambdas.

@Velfi Velfi removed the needs-triage This issue or PR still needs to be triaged. label Oct 24, 2022
@jmklix jmklix added the p2 This is a standard priority issue label Nov 14, 2022
@rafalwrzeszcz
Copy link

In the meantime if anyone needs that (like I do) - I'm using https://github.com/softprops/xray ; it requires custom binding unfortunately, as it only offers data structures and UDP client itself but… works.

@rafalwrzeszcz
Copy link

I've spent some time to integrate tracing spans generated by SDK with mentioned above X-Ray UDP client - feel free to try out https://wrzasq.pl/blog/x-ray-tracing-for-aws-rust-sdk-in-lambda-runtime.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants