-
Notifications
You must be signed in to change notification settings - Fork 146
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
Bug: Tracer escape hatch does not expose full AWSXRay api #2943
Comments
Hi @RaphaelManke, we'll get the docs changed and clarify that we expose only some methods. Regarding the one you want to overwrite, when working on Lambda the streaming threshold must be set to 0, meaning a segment is sent to X-Ray as soon as it's closed. This is to avoid data loss. |
I should add that if you really want to change the threshold, you can import the function directly from |
Thanks for the fast feedback 😃 Yes I noticed
also works 😃 maybe that could be mentioned in the new escape hatch docs. In my Usecase I want to redirect the xray udp packages to an lambda extension. This is not working as expected right now and then I found in the xray sdk doc https://docs.aws.amazon.com/xray-sdk-for-nodejs/latest/reference/segments_segment_utils.js.html You referenced link shows that the threshold is actually set to 0 which I can confirm in the logs. |
Hey @RaphaelManke and @dreamorosi! My 2 cents here.. In Python we enforce threshold to be zero, so we make sure we are overriding the SDK default value which is 30. But in NodeJs looks like that the SDK does this automatically when running in Lambda, which is cool. @RaphaelManke just out of curiosity. In your case, is this not working to configure/send the batch size, or are you having trouble configuring the redirect of the xray agent's default IP/port? |
@leandrodamascena I experienced some timing issue that the message weren't yet passed to the "offload queue". For now a delay fixed it. The final POC solution should look like this But this is all not related to this issue 😅 I am happy to discuss that on discord (either BelieveInServerless -> Observability or Powertools) |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.8.0 version! |
Expected Behavior
Based on the documentation
But this is not true. It only re-exposes a subset of methods.
see https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/packages/tracer/src/provider/ProviderService.ts
In my case I wanted to overwrite the
setStreamingThreshold()
method which is not implemented.Current Behavior
An error is thrown because the method is not implemented
Code snippet
produces an error.
The text was updated successfully, but these errors were encountered: