Skip to content

Commit e061f13

Browse files
feat: add Java dynamic dedup agent
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1 parent 35b3eca commit e061f13

5 files changed

Lines changed: 631 additions & 305 deletions

File tree

agent/src/main/java/io/keploy/agent/KAgent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.keploy.agent;
22

3+
import io.keploy.dedup.KeployDedupAgent;
34
import net.bytebuddy.ByteBuddy;
45
import net.bytebuddy.agent.builder.AgentBuilder;
56
import net.bytebuddy.asm.Advice;
@@ -55,6 +56,7 @@ public static void premain(String arg, Instrumentation instrumentation) {
5556

5657
logger.debug("inside premain method");
5758
logger.debug("KeployMode:{}", System.getenv("KEPLOY_MODE"));
59+
KeployDedupAgent.start();
5860

5961
if (System.getenv("KEPLOY_MODE") == null || Objects.equals(System.getenv("KEPLOY_MODE"), "off")) {
6062
return;
@@ -517,4 +519,4 @@ public void visitMethodInsn(int opcode, String owner, String name, String descri
517519
);
518520
}
519521

520-
}
522+
}

integration/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@
117117
<artifactId>org.jacoco.core</artifactId>
118118
<version>0.8.7</version>
119119
</dependency>
120+
<dependency>
121+
<groupId>com.kohlschutter.junixsocket</groupId>
122+
<artifactId>junixsocket-core</artifactId>
123+
<version>2.10.1</version>
124+
<type>pom</type>
125+
</dependency>
120126
<dependency>
121127
<groupId>com.google.maps</groupId>
122128
<artifactId>google-maps-services</artifactId>
@@ -150,4 +156,4 @@
150156
<maven.compiler.target>1.8</maven.compiler.target>
151157
</properties>
152158

153-
</project>
159+
</project>

0 commit comments

Comments
 (0)