Skip to content

Values passed to lambda_metric of incorrect type do not raise an exception. #347

Closed
@aaron-csetter

Description

@aaron-csetter

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 and v75
  • Python version: 3.10

Stacktrace

I wish there was one.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions