diff --git a/.gitignore b/.gitignore
index 32c595d..0d7f9ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -221,3 +221,4 @@ _meta
.serverless
package-lock.json
src/main/resources/lumigo-agent.jar
+.vscode/
diff --git a/pom.xml b/pom.xml
index ec31760..4c04a10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,25 +1,19 @@
-
+
4.0.0
-
io.lumigo
java-tracer
1.0.42
jar
-
Lumigo java tracer
The Lumigo java tracer for serverless functions
https://lumigo.io/
-
https://github.com/lumigo-io/java-tracer
scm:git:https://github.com:lumigo-io/java-tracer.git
scm:git:https://github.com:lumigo-io/java-tracer.git
1.0.42
-
Lumigo Dev Team
@@ -28,12 +22,10 @@
https://lumigo.io/
-
Lumigo
https://lumigo.io/
-
Apache License, Version 2.0
@@ -41,8 +33,6 @@
repo
-
-
ossrh
@@ -53,8 +43,6 @@
https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
1.8
1.8
@@ -159,7 +147,7 @@
org.projectlombok
lombok
- 1.18.22
+ 1.18.32
provided
@@ -182,7 +170,11 @@
byte-buddy-agent
1.14.14
-
+
+ org.json
+ json
+ 20210307
+
org.junit.jupiter
@@ -233,7 +225,7 @@
**/lumigo-version.txt
-
+
@@ -267,8 +259,7 @@
-
-
+
org.apache.maven.plugins
maven-surefire-plugin
@@ -297,12 +288,11 @@
3.0.5
+ Enables analysis which takes more memory but finds more bugs.
+ If you run out of memory, changes the value of the effort element
+ to 'Low'.
+ -->
Max
-
Low
@@ -312,9 +302,7 @@
findbugs/findbugs-exclude.xml
-
+
analyze-compile
compile
@@ -327,7 +315,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.3
+ 0.8.11
@@ -377,4 +365,4 @@
-
+
\ No newline at end of file
diff --git a/scripts/checks.sh b/scripts/checks.sh
index bd5e831..01a91bb 100755
--- a/scripts/checks.sh
+++ b/scripts/checks.sh
@@ -2,5 +2,5 @@
set -eo pipefail
java -jar libs/google-java-format-1.7-all-deps.jar --set-exit-if-changed -i -a $(find . -type f -name "*.java" | grep ".*/src/.*java")
-mvn -f agent/pom.xml clean package
-mvn clean package
\ No newline at end of file
+mvn -Djava.security.manager=allow -f agent/pom.xml clean package
+mvn -Djava.security.manager=allow clean package
\ No newline at end of file
diff --git a/src/main/java/io/lumigo/core/SpansContainer.java b/src/main/java/io/lumigo/core/SpansContainer.java
index acabae0..50a12ef 100644
--- a/src/main/java/io/lumigo/core/SpansContainer.java
+++ b/src/main/java/io/lumigo/core/SpansContainer.java
@@ -9,9 +9,12 @@
import io.lumigo.core.parsers.v1.AwsSdkV1ParserFactory;
import io.lumigo.core.parsers.v2.AwsSdkV2ParserFactory;
import io.lumigo.core.utils.AwsUtils;
+import io.lumigo.core.utils.EnvUtil;
import io.lumigo.core.utils.JsonUtils;
+import io.lumigo.core.utils.SecretScrubber;
import io.lumigo.core.utils.StringUtils;
import io.lumigo.models.HttpSpan;
+import io.lumigo.models.Reportable;
import io.lumigo.models.Span;
import java.io.*;
import java.util.*;
@@ -38,6 +41,7 @@ public class SpansContainer {
private static final String AMZN_TRACE_ID = "_X_AMZN_TRACE_ID";
private static final String FUNCTION_SPAN_TYPE = "function";
private static final String HTTP_SPAN_TYPE = "http";
+ private static final SecretScrubber secretScrubber = new SecretScrubber(new EnvUtil().getEnv());
private Span baseSpan;
private Span startFunctionSpan;
@@ -45,7 +49,6 @@ public class SpansContainer {
private Span endFunctionSpan;
private Reporter reporter;
private List httpSpans = new LinkedList<>();
-
private static final SpansContainer ourInstance = new SpansContainer();
public static SpansContainer getInstance() {
@@ -68,6 +71,7 @@ private SpansContainer() {}
public void init(Map env, Reporter reporter, Context context, Object event) {
this.clear();
this.reporter = reporter;
+
int javaVersion = AwsUtils.parseJavaVersion(System.getProperty("java.version"));
if (javaVersion > 11) {
awsTracerId = System.getProperty("com.amazonaws.xray.traceHeader");
@@ -214,8 +218,8 @@ public Span getStartFunctionSpan() {
return startFunctionSpan;
}
- public List