-
Notifications
You must be signed in to change notification settings - Fork 148
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
Feature request: HTTP request/response annotations #1179
Comments
Hi @revmischa thank you for taking the time to open a feature request. As I have briefly mentioned on Discord: at the moment we don't use any of the Before considering the feature and putting it into the backlog, I would like some investigation to take place to make a small PoC and understand the impact and compatibility of this feature with Powertools. Like with all features, contributions are more than welcome, and in case this is left to the maintainers, having 👍 on the feature request will help increasing its priority in our backlog. If anyone is interested in picking up this issue, please leave a comment below to express your interest and agree on next steps. The maintainers will be happy to support you with clearing doubts or questions on the scope and codebase. |
For my purposes a simpler version of this would be to let me manually set the HTTP path, method, status code directly on the segment. But I have no idea how to do this and couldn't find any documentation on how to manually set those attributes. |
this is https://www.npmjs.com/package/aws-xray-sdk-express feature, this is very useful when we are tracing some ip address or api URL in a easy way |
FYI @revmischa, I have been looking at the I'll keep looking, also using the example that was just posted above. |
This comment was marked as outdated.
This comment was marked as outdated.
Please keep open |
This comment was marked as off-topic.
This comment was marked as off-topic.
With the upcoming Event Handler feature incoming, we'll need a way to add these annotations to segments generated by Tracer. I've been looking at the implementation more closely and I think that we should implement a version of this method so that the I'm adding this to the backlog so we can work on it at some point in the coming months. The issue is open for contributions. If you’re interested, please leave a comment before starting a PR. Let’s discuss and agree on a design for the new feature before implementing it. I don’t want to expose the method as-is from the X-Ray SDK. |
Hi @dreamorosi, I’d love to take on this feature request and implement HTTP metadata annotation for X-Ray segments in the Tracer utility. |
Use case
I have a nextjs CDK construct with a simple APIGW lambda wrapper around nextjs. I want to annotate my traces with HTTP request and response metadata, e.g. "URL" and "method" and "status code"
I would like to use it here: https://github.com/jetbridge/cdk-nextjs/blob/main/assets/lambda/NextJsHandler.ts#L45
I'd like to see the status code, path, method, etc in xray:
![image](https://user-images.githubusercontent.com/245131/202774654-31543c7e-f3bd-4479-ad0c-6d33b5c43eed.png)
Solution/User Experience
Perhaps something like
traceRequestResponseCycle
in https://docs.aws.amazon.com/xray-sdk-for-nodejs/latest/reference/AWSXRay.htmlAlternative solutions
Discussed on discord: https://discord.com/channels/1006478942305263677/1006527385409179678/1042309163818168380
Acknowledgment
The text was updated successfully, but these errors were encountered: