- 
                Notifications
    
You must be signed in to change notification settings  - Fork 46
 
Detect exceptions raised outside of the handler #475
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
Detect exceptions raised outside of the handler #475
Conversation
80486fd    to
    76e5cee      
    Compare
  
    85d0d7d    to
    0bc08fd      
    Compare
  
    | 
           FYI, pulling from main should fix the check layer size test failure.  | 
    
39af365    to
    f0e8c5e      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work – LGTM.
There's one nit:
datadog-lambda-python/datadog_lambda/tracing.py
Lines 1236 to 1255 in 21012cb
| tags = None | |
| if context: | |
| function_arn = (context.invoked_function_arn or "").lower() | |
| tk = function_arn.split(":") | |
| function_arn = ":".join(tk[0:7]) if len(tk) > 7 else function_arn | |
| function_version = tk[7] if len(tk) > 7 else "$LATEST" | |
| tags = { | |
| "cold_start": str(is_cold_start).lower(), | |
| "function_arn": function_arn, | |
| "function_version": function_version, | |
| "request_id": context.aws_request_id, | |
| "resource_names": context.function_name, | |
| "functionname": context.function_name.lower() | |
| if context.function_name | |
| else None, | |
| "datadog_lambda": datadog_lambda_version, | |
| "dd_trace": ddtrace_version, | |
| "span.name": "aws.lambda", | |
| } | |
| tags = tags or {} | 
Should we care about some of the tags that can be added from this? i.e. functionname, cold_start (which should always be true if we are loading), datadog_lambda_version, ddtrace_version
26ed616    to
    47c0dab      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM – left a nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…d outside of the handler function
Co-authored-by: jordan gonzález <30836115+duncanista@users.noreply.github.com>
f6a8496    to
    7c5aa58      
    Compare
  
    
What does this PR do?
This PR adds telemetry for exceptions that occur outside of the handler function.
When an exception occurs outside of the handler function:
aws.lambda.enhanced.errorsis emittedMotivation
Testing Guidelines
aws.lambda.enhanced.errorsemitted (graph)Additional Notes
Types of Changes
Check all that apply
https://datadoghq.atlassian.net/browse/SVLS-4666