Skip to content

Commit

Permalink
Merge pull request #1 in AE/aws-lambda-monitoring-extension from v2.0…
Browse files Browse the repository at this point in the history
….4 to master

* commit 'de9136928239c59170daa82effb9bfdf0034699a':
  ACE-980 moving to commons 2.2.3
  ACE-980 Logger Update. moving to commons version 2.2.2
  • Loading branch information
Vishaka Sekar committed May 1, 2020
2 parents 2789680 + de91369 commit b6fb859
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.0.4
1. Updated aws-cloudwatch-exts-commons to 2.2.3

#### 2.0.3
1. Added controllerInfo section and health check flag in config.yml
2. Updated aws-cloudwatch-exts-commons to 2.2.1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.appdynamics.extensions</groupId>
<artifactId>aws-lambda-monitoring-extension</artifactId>
<version>2.0.3</version>
<version>2.0.4</version>
<name>AWS Lambda Monitoring Extension</name>

<properties>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>com.appdynamics.extensions</groupId>
<artifactId>aws-cloudwatch-exts-commons</artifactId>
<version>2.2.1</version>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<IncludeMetric> includeMetrics;
private List<Dimension> dimensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,7 +28,7 @@
*/
public class LambdaMonitor extends SingleNamespaceCloudwatchMonitor<Configuration> {

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);
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b6fb859

Please sign in to comment.