Open
Description
According the README, flush()
"[f]lushes the current MetricsContext to the configured sink and resets all properties, dimensions and metric values. The namespace and default dimensions will be preserved across flushes."
However, in MetricContext.create_copy_with_context()
, which is used by MetricsLogger.flush()
to reset the context, copies the old properties. This means in my Lambda function, if I have conditional properties in my logging object, once I've set one in one invocation, it remains present in the context in future invocations.