generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hello team,
Philipp here from Powertools for AWS Lambda (Java). I found an issue where EMF logs a JSON object when flushing even if the customer did not add any metrics. I believe that this is a bug but wanted to confirm with you if this is expected.
Related issue in Powertools for AWS Lambda (Java) repository: aws-powertools/powertools-lambda-java#1890
For example, if I do this:
emfLogger = new software.amazon.cloudwatchlogs.emf.logger.MetricsLogger(environmentProvider,
metricsContext);
emfLogger.setNamespace("MyNamespace");
emfLogger.putDimensions(DimensionSet.of("Service", "MyService");
emfLogger.flush()I see this in my logs when running on AWS Lambda with Java 11 runtime:
{"Service":"MyService"}My expectation is that nothing should be logged because I did not call putMetric at any point. What do you think?
Metadata
Metadata
Assignees
Labels
No labels