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

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

Closed
heitorlessa opened this issue Aug 22, 2020 · 2 comments
Closed

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

heitorlessa opened this issue Aug 22, 2020 · 2 comments
Assignees
Labels
feature-request feature request

Comments

@heitorlessa
Copy link
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

@heitorlessa heitorlessa added the feature-request feature request label Aug 22, 2020
@heitorlessa heitorlessa self-assigned this Aug 22, 2020
@michaelbrewer
Copy link
Contributor

michaelbrewer commented Aug 22, 2020

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

heitorlessa referenced this issue in heitorlessa/aws-lambda-powertools-python Aug 22, 2020
heitorlessa referenced this issue in ran-isenberg/aws-lambda-powertools-python Aug 26, 2020
* develop: (26 commits)
  docs: move tenets; remove extra space
  docs: use table for clarity
  docs: add blog post, and quick example
  docs: subtle rewording for better clarity
  docs: fix typos, log_event & sampling wording
  docs: make sensitive info more explicit with an example
  docs: create Patching modules section; cleanup response wording
  docs: move concurrent asynchronous under escape hatch
  chore: update internal docstrings for consistency
  fix: remove actual response from debug logs
  docs: grammar
  docs: bring new feature upfront when returning sensitive info
  chore: update changelog to reflect new feature
  chore: clarify changelog bugfix vs breaking change
  chore: remove/correct unnecessary debug logs
  chore: fix debug log adding unused obj
  fix: naming and staticmethod consistency
  improv: naming consistency
  fix: correct in_subsegment assertion
  feat: capture_response as metadata option #127
  ...
@heitorlessa
Copy link
Contributor Author

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
Labels
feature-request feature request
Projects
None yet
Development

No branches or pull requests

2 participants