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

'_LambdaDecorator' object has no attribute 'trigger_tags' #532

Closed
CatalinAndrei-Flam opened this issue Nov 5, 2024 · 2 comments · Fixed by #533
Closed

'_LambdaDecorator' object has no attribute 'trigger_tags' #532

CatalinAndrei-Flam opened this issue Nov 5, 2024 · 2 comments · Fixed by #533

Comments

@CatalinAndrei-Flam
Copy link

Expected Behavior

Datadog should not throw errors, in previous version this did not happen. (extension_layer_version:64, python_layer_version:98)

Actual Behavior

Datadog throws errors because it cannot extract the tags from the event. In this case the incoming event is not a dictionary but a list of dictionaries that's generated by a dynamodb stream in an aws eventbridge pipe with batching enabling.

Steps to Reproduce the Problem

  1. Update extension_layer_version to 65 and python_layer_version to 99
  2. Create. eventbridge pipe with dynamodb stream to lambda and batching enabled .
  3. Trigger multiple changes in the dynamodb table with stream enabled which will generate a list of dicts as an input event for the lambda that's failing.
    Image

Specifications

  • extension_layer_version": 65
  • python_layer_version: 99
  • Python version: 3.11

Stacktrace

[ERROR]	2024-10-30T07:48:05.533Z	faa1c31f-9cde-4738-ba9d-fd118ea51f8e	Error 'list' object has no attribute 'get'. Traceback: Traceback (most recent call last):
File "./python/lib/python3.11/site-packages/datadog_lambda/wrapper.py", line 282, in _before
File "./python/lib/python3.11/site-packages/datadog_lambda/tracing.py", line 414, in is_legacy_lambda_step_function
AttributeError: 'list' object has no attribute 'get'

and

[ERROR]	2024-10-30T07:48:05.323Z	aca884cf-00d7-4b80-8764-6883788465f2	Error '_LambdaDecorator' object has no attribute 'trigger_tags'. Traceback: Traceback (most recent call last):
File "./python/lib/python3.11/site-packages/datadog_lambda/wrapper.py", line 331, in _after
AttributeError: '_LambdaDecorator' object has no attribute 'trigger_tags'
@purple4reina
Copy link
Contributor

Thank you for reporting this. We are looking to get a fix out right away.

@purple4reina
Copy link
Contributor

Hi @CatalinAndrei-Flam, we have a released layer v101 which contains a fix for this issue. Please test it out and let us know if there's anything else you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants