-
Notifications
You must be signed in to change notification settings - Fork 581
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
Expose more data in middleware to improve X-Ray and OTel traces #4902
Comments
Hi @bilalq , JS SDK v3 exposes the same exact parameters that v2 does, the only difference is that those parameters are accessible via the middleware stack, which will require the Xray team to make adjustments on how the Xray clients accesses the data. Im sorry to ping pong you around back to the Xray team, but I did have a conversation with their PM @willarmiros (who now is no longer at Amazon) on March 2023, about this issue and had proven that all the relevant info is available via middleware stack. Since there's no action needed from the JS SDK team so Im going to close this. I encourage you to open the same feature request in their repo, so it can get traction and prioritized. All the best, |
Thanks for clarifying that, @RanVaknin. An issue for this has been open for over half a year now. Could you help surface visibility of this to stakeholders on the X-Ray team? Without proper tracing support, it's not safe for us to migrate to SDK v3, despite deprecation of v2. |
Hi @bilalq , You can use OTEL instead of xray for instrumenting v3. It is now supported there. Thanks, |
Hi @bilalq, v2 and v3 metadata is captured in opentelemetry JS (additional attributes will be part of the next opentelemetry release). We recommend using the OpenTelemetry JS SDK for instrumenting AWS SDK v3 clients as it provides a consistent experience across v2 and v3 |
Hi @RanVaknin and @carolabadeer, Unfortunately, the OpenTelemetry JS SDK is not suitable in Lambda for most production use-cases. It comes with a massive performance and latency penalty. It's a complete non-starter to add tracing through it when the overhead is so large. Related issues showing that this is still a problem today: aws-observability/aws-otel-lambda#228 This is even highlighted in the official service docs for X-Ray:
|
Hey @RanVaknin and @carolabadeer. Just pinging on this. The current situation is that existing tools are outdated and deprecated and the recommended replacements have show-stopping bugs and usability regressions. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Describe the feature
The X-Ray SDK generates much more useful traces with AWS SDK v2 than it does with v3 (e.g., table/bucket specific nodes rather than generic "DynamoDB" and "S3" nodes). The X-Ray team has claimed that this is due to the v3 SDK exposing less data in its middleware.
mattfysh commented on Nov 29, 2022:
willarmiros commented on Dec 19, 2022:
Could the SDK and X-Ray/OTel teams collaborate here to improve tracing? Now that SDK v2 is being deprecated, this has essentially become a service degradation for customers.
@willarmiros, Could you maybe chime in here on what specifically is missing from the data exposed in the middleware?
Use Case
Traces are noticeably worse when using AWS SDK v3 over v2.
Proposed Solution
Expose more data in the middleware so that tracing libraries can be at parity with SDK v2.
Other Information
It's also notable that capturing v3 clients fails typechecks in TypeScript. The X-Ray team has suggested casting to
any
as a workaround, but that is unacceptable and incredibly error-prone. I don't know if interface compatibility changes are needed or if this is just a matter of using a peerDep instead of a normal dep. Maybe an adjustment of version range? Whatever the case, the current experience is troublesome.Acknowledgements
SDK version used
N/A
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: