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

Feature request: Tracer disable response capturing on a per-method basis #1064

Closed
misterjoshua opened this issue Aug 18, 2022 · 2 comments · Fixed by #1065
Closed

Feature request: Tracer disable response capturing on a per-method basis #1064

misterjoshua opened this issue Aug 18, 2022 · 2 comments · Fixed by #1065
Assignees
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility tracer This item relates to the Tracer Utility

Comments

@misterjoshua
Copy link
Contributor

misterjoshua commented Aug 18, 2022

Description of the feature request

I'd like tracer.captureMethod() to allow customers to disable capturing the response as metadata on a per-method basis.

Problem statement

I find when capturing a method that returns a boatload of data, the subsegment may fail to send because the subsegment exceeds X-Ray's 64KB segment document size limit.

image

In my project, I'm finding it useful to capture the response by default. But, in this particular case, there's just this one method with an oversized method response. I'd want to disable response capture on a per-method basis rather than globally, so the POWERTOOLS_TRACER_CAPTURE_RESPONSE env doesn't fit my need.

Summary of the feature

I think that AWS Lambda Powertools for TypeScript should implement the Python version's decorator option.

Code examples

const tracer = new Tracer();

class MyThing {
  @tracer.captureMethod({ captureResponse: false })
  getBigResponse() { ... }
}

Benefits for you and the wider AWS community

Allowing customers to disable response capturing on a per-method basis would allow them to observe these subsegments in their trace timelines where they would otherwise fail to send.

Describe alternatives you've considered

I considered POWERTOOLS_TRACER_CAPTURE_RESPONSE, but I don't want to disable response capturing across my entire app.

Additional context

None

Related issues, RFCs

None

@misterjoshua misterjoshua added the triage This item has not been triaged by a maintainer, please wait label Aug 18, 2022
@dreamorosi dreamorosi added the tracer This item relates to the Tracer Utility label Aug 18, 2022
@dreamorosi
Copy link
Contributor

dreamorosi commented Aug 18, 2022

Thank you @misterjoshua for opening this feature request.

I can see how this behavior is desirable, especially in light of the X-Ray payload limit that you have mentioned. At the moment the behavior is all-or-nothing and you can't really opt out on a per-method basis.

Please give us some time to prioritise the request and fit it in our roadmap. As soon as we have an implementer either from the community or from the maintainers team we'll assign the issue and change the status to "In Progress".

@dreamorosi dreamorosi added enhancement and removed triage This item has not been triaged by a maintainer, please wait labels Aug 18, 2022
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues 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.

@github-actions github-actions bot added the pending-release This item has been merged and will be released soon label Aug 23, 2022
@dreamorosi dreamorosi removed the pending-release This item has been merged and will be released soon label Oct 27, 2022
@dreamorosi dreamorosi changed the title Feature (tracer): disable response capturing on a per-method basis Feature request: disable response capturing on a per-method basis Nov 14, 2022
@dreamorosi dreamorosi changed the title Feature request: disable response capturing on a per-method basis Feature request: Tracer disable response capturing on a per-method basis Nov 14, 2022
@dreamorosi dreamorosi added feature-request This item refers to a feature request for an existing or new utility completed This item is complete and has been merged/shipped labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility tracer This item relates to the Tracer Utility
Projects
None yet
2 participants