-
Notifications
You must be signed in to change notification settings - Fork 406
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
Enable tracing only when running on AWS Lambda #572
Labels
feature-request
feature request
Milestone
Comments
Dunedan
added
feature-request
feature request
triage
Pending triage from maintainers
labels
Jul 29, 2021
Thanks a lot Daniel! We’ll work on it
…On Thu, 29 Jul 2021 at 07:13, Daniel Roschka ***@***.***> wrote:
*Is your feature request related to a problem? Please describe.*
When running code related to an AWS Lambda function outside of AWS Lambda
(e.g. when running unit tests or when re-using a function for something
else like a CLI script), Tracer with its default configuration fails, as
it expects an open X-Ray segment, which usually isn't available in these
cases.
That default behavior requires explicitly disabling tracing when not
running on AWS Lambda, which is quite annoying and AWS Lambda Powertools
could do a better job to simplify things for its users there.
This problem got discussed in detail in #515
<#515>.
*Describe the solution you'd like*
I'd like to see a default behavior where tracing is only enabled if the
code is running on AWS Lambda.
*Describe alternatives you've considered*
An alternative to enable tracing only on AWS Lambda could be to let Tracer
create a segment if there isn't already one, however I'm not sure about
possible side effects.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#572>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBH4XLWD7CX5X3S67JLT2DPQ3ANCNFSM5BFWDJ3Q>
.
|
heitorlessa
added
pending-release
Fix or implementation already in dev waiting to be released
and removed
pending-release
Fix or implementation already in dev waiting to be released
labels
Aug 10, 2021
Now released as part of 1.19.0: https://github.com/awslabs/aws-lambda-powertools-python/releases/tag/v1.19.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When running code related to an AWS Lambda function outside of AWS Lambda (e.g. when running unit tests or when re-using a function for something else like a CLI script),
Tracer
with its default configuration fails, as it expects an open X-Ray segment, which usually isn't available in these cases.That default behavior requires explicitly disabling tracing when not running on AWS Lambda, which is quite annoying and AWS Lambda Powertools could do a better job to simplify things for its users there.
This problem got discussed in detail in #515.
Describe the solution you'd like
I'd like to see a default behavior where tracing is only enabled if the code is running on AWS Lambda.
Describe alternatives you've considered
An alternative to enable tracing only on AWS Lambda could be to let
Tracer
create a segment if there isn't already one, however I'm not sure about possible side effects.The text was updated successfully, but these errors were encountered: