Skip to content

Tracer - Option to not add method/handler response as metadata  #127

Closed
@heitorlessa

Description

@heitorlessa
Contributor

Is your feature request related to a problem? Please describe.

Customers like @michaelbrewer would like the ability to override Tracer default behaviour by not adding Lambda handler, or a method's response as X-Ray subsegment metadata - While X-Ray metadata isn't indexed or searchable, it might contain sensitive information that can violate one's compliance.

Describe the solution you'd like

A new keyword argument for both capture_method and capture_lambda_handler:

@tracer.capture_lambda_handler(capture_response=False)
def handler(event, context):
    ...

@tracer.capture_method(capture_response=False)
def a_function():
    ...

Describe alternatives you've considered

  • Encrypt or mask sensitive information from response

Additional context

Activity

self-assigned this
on Aug 22, 2020
michaelbrewer

michaelbrewer commented on Aug 22, 2020

@michaelbrewer
Contributor

Thank you @heitorlessa . Without this featured, would have prevented us from using this library in some cases.

heitorlessa

heitorlessa commented on Aug 26, 2020

@heitorlessa
ContributorAuthor

This was released in 1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @heitorlessa@michaelbrewer

      Issue actions

        Tracer - Option to not add method/handler response as metadata · Issue #127 · aws-powertools/powertools-lambda-python