Closed
Description
Expected Behavior
When a value passed to lambda_metric()
is of an incorrect value or type (not something that can be sent as a metric), a TypeError
or ValueError
should be raised.
Actual Behavior
In the example below, neither call actually goes through and no exception is raised in the main thread. This makes debugging a nightmare.
Steps to Reproduce the Problem
@datadog_lambda_wrapper
def lambda_handler(lambda_event, _context):
lambda_metric("should.work", 1)
lambda_metric("should.raise.exception", "oops")
Specifications
- Datadog Lambda Layer version:
v73
andv75
- Python version:
3.10
Stacktrace
I wish there was one.