From e9814ec5c554e3d5bd925b334b395ac5f731c816 Mon Sep 17 00:00:00 2001 From: Vishaka Sekar Date: Wed, 29 Apr 2020 19:26:11 -0700 Subject: [PATCH 1/2] ACE-980 Logger Update. moving to commons version 2.2.2 --- CHANGELOG.md | 3 +++ LICENSE.txt | 2 +- README.md | 4 ++-- pom.xml | 4 ++-- .../aws/lambda/LambdaMetricsProcessor.java | 6 ++++-- .../extensions/aws/lambda/LambdaMonitor.java | 16 +++++++++------- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a057511..4c5d379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +#### 2.0.4 + 1. Updated aws-cloudwatch-exts-commons to 2.2.2 + #### 2.0.3 1. Added controllerInfo section and health check flag in config.yml 2. Updated aws-cloudwatch-exts-commons to 2.2.1 diff --git a/LICENSE.txt b/LICENSE.txt index 497016e..e46526d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2018 AppDynamics LLC and its affiliates +Copyright 2020 AppDynamics LLC and its affiliates Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 255372a..d1bbb3d 100644 --- a/README.md +++ b/README.md @@ -220,8 +220,8 @@ Always feel free to fork and contribute any changes directly here on [GitHub](ht ## Version | Name | Version | |--------------------------|------------| - |Extension Version |2.0.3 | + |Extension Version |2.0.4 | |Controller Compatibility |4.4 or Later| |Agent Compatibility | 4.5.13 or later| - |Last Update |09 March, 2020 | + |Last Update |29 Apr, 2020 | List of changes to this extension can be found [here](https://github.com/Appdynamics/aws-lambda-monitoring-extension/blob/master/CHANGELOG.md) diff --git a/pom.xml b/pom.xml index dd4342a..a6cacc6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ 4.0.0 com.appdynamics.extensions aws-lambda-monitoring-extension - 2.0.3 + 2.0.4 AWS Lambda Monitoring Extension @@ -31,7 +31,7 @@ com.appdynamics.extensions aws-cloudwatch-exts-commons - 2.2.1 + 2.2.2 junit diff --git a/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMetricsProcessor.java b/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMetricsProcessor.java index c460ce3..6d8a390 100644 --- a/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMetricsProcessor.java +++ b/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMetricsProcessor.java @@ -18,8 +18,10 @@ import com.appdynamics.extensions.aws.metric.processors.MetricsProcessor; import com.appdynamics.extensions.aws.metric.processors.MetricsProcessorHelper; import com.appdynamics.extensions.aws.predicate.MultiDimensionPredicate; +import com.appdynamics.extensions.logging.ExtensionsLoggerFactory; import com.google.common.collect.Lists; -import org.apache.log4j.Logger; +import org.slf4j.Logger; + import java.util.HashMap; import java.util.List; @@ -32,7 +34,7 @@ */ public class LambdaMetricsProcessor implements MetricsProcessor { - private static final Logger LOGGER = Logger.getLogger(LambdaMetricsProcessor.class); + private static final Logger LOGGER = ExtensionsLoggerFactory.getLogger(LambdaMetricsProcessor.class); private static final String NAMESPACE = "AWS/Lambda"; private List includeMetrics; private List dimensions; diff --git a/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMonitor.java b/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMonitor.java index 7e88d3d..251143a 100644 --- a/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMonitor.java +++ b/src/main/java/com/appdynamics/extensions/aws/lambda/LambdaMonitor.java @@ -12,7 +12,9 @@ import com.appdynamics.extensions.aws.collectors.NamespaceMetricStatisticsCollector; import com.appdynamics.extensions.aws.config.Configuration; import com.appdynamics.extensions.aws.metric.processors.MetricsProcessor; -import org.apache.log4j.Logger; +import com.appdynamics.extensions.logging.ExtensionsLoggerFactory; +import org.slf4j.Logger; + import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +28,7 @@ */ public class LambdaMonitor extends SingleNamespaceCloudwatchMonitor { - private static final Logger LOGGER = Logger.getLogger("LambdaMonitor.class"); + private static final Logger LOGGER = ExtensionsLoggerFactory.getLogger("LambdaMonitor.class"); private static final String DEFAULT_METRIC_PREFIX = String.format("%s%s%s%s", "Custom Metrics", METRIC_PATH_SEPARATOR, "Amazon Lambda", METRIC_PATH_SEPARATOR); @@ -69,16 +71,16 @@ protected NamespaceMetricStatisticsCollector getNamespaceMetricsCollector(Config .build(); } - @Override - protected Logger getLogger() { - return LOGGER; - } - private MetricsProcessor createMetricsProcessor(Configuration config) { return new LambdaMetricsProcessor( config.getMetricsConfig().getIncludeMetrics(), config.getDimensions()); } + + @Override + protected Logger getLogger() { + return LOGGER; + } /* public static void main(String[] args) throws TaskExecutionException { From de9136928239c59170daa82effb9bfdf0034699a Mon Sep 17 00:00:00 2001 From: Vishaka Sekar Date: Thu, 30 Apr 2020 10:11:00 -0700 Subject: [PATCH 2/2] ACE-980 moving to commons 2.2.3 --- CHANGELOG.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c5d379..6c44e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ #### 2.0.4 - 1. Updated aws-cloudwatch-exts-commons to 2.2.2 + 1. Updated aws-cloudwatch-exts-commons to 2.2.3 #### 2.0.3 1. Added controllerInfo section and health check flag in config.yml diff --git a/pom.xml b/pom.xml index a6cacc6..e1ba424 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ com.appdynamics.extensions aws-cloudwatch-exts-commons - 2.2.2 + 2.2.3 junit