Closed nr-synth closed 1 month ago
Thanks for reporting this @nr-synth, this is indeed a bug in the library. I'll get started working on a fix.
However, you shouldn't need to ever call this method manually yourself. The datadog wrapper will do it for you after each invocation. Are you calling this manually?
Thanks @purple4reina - I don't have the full context, best I can surmise is that we were using this function when locally testing Lambda code with Datadog.
The change has been merged and will go out with our next release. Thanks again for reporting this!
Expected Behavior
metric.flush_stats
has an optionallambda_context
argument, defaulting toNone
.Omitting this argument shouldn't cause issues, and didn't in earlier versions of the library.
Actual Behavior
Exception thrown:
builtins.UnboundLocalError: local variable 'tags' referenced before assignment
Steps to Reproduce the Problem
metric.flush_stats()
Specifications
Stacktrace