Skip to content

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Aug 10, 2021

Issue #, if available:

Description of changes:

Disables tracer when not running as a lambda ie: LAMBDA_TASK_ROOT env is not set

Changes:

  • If LAMBDA_TASK_ROOT is not set then we assume tracer should be disabled
  • Remove SAM_LOCAL_ENV and CHALICE_LOCAL_ENV checks
  • Update tests

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 10, 2021
@michaelbrewer
Copy link
Contributor Author

@heitorlessa - I am not sure if we need to modify the docs for this. But it should help simplify some people's life.

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2021

Codecov Report

Merging #598 (e65ab8d) into develop (b9a1d54) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #598      +/-   ##
===========================================
- Coverage    99.95%   99.95%   -0.01%     
===========================================
  Files          113      113              
  Lines         4535     4533       -2     
  Branches       245      245              
===========================================
- Hits          4533     4531       -2     
  Partials         2        2              
Impacted Files Coverage Δ
aws_lambda_powertools/shared/constants.py 100.00% <100.00%> (ø)
aws_lambda_powertools/tracing/tracer.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9a1d54...e65ab8d. Read the comment docs.

@heitorlessa heitorlessa added this to the 1.19.0 milestone Aug 10, 2021
@heitorlessa heitorlessa changed the title feat(tracer): disable tracer when not running in a AWS Lambda environment feat(tracer): disable tracer when for non-Lambda envs Aug 10, 2021
@heitorlessa heitorlessa merged commit 06be626 into aws-powertools:develop Aug 10, 2021
@heitorlessa heitorlessa changed the title feat(tracer): disable tracer when for non-Lambda envs feat(tracer): disable Tracer when for non-Lambda envs Aug 10, 2021
@heitorlessa heitorlessa changed the title feat(tracer): disable Tracer when for non-Lambda envs feat(tracer): disable tracer when for non-Lambda envs Aug 10, 2021
@heitorlessa heitorlessa added the feature New feature or functionality label Aug 10, 2021
@heitorlessa heitorlessa changed the title feat(tracer): disable tracer when for non-Lambda envs feat(tracer): disable tracer for non-Lambda envs Aug 10, 2021
@heitorlessa heitorlessa changed the title feat(tracer): disable tracer for non-Lambda envs feat(tracer): auto-disable tracer when for non-Lambda envs Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants