moving maven plugin to use agent-instrumeneter (#378)
* moving maven plugin to use agent-instrumeneter * Better inclusion of agent jar as resource * Move plugin declaration Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This commit is contained in:
parent
f3d64a4601
commit
d39d7e596c
|
|
@ -1,4 +1,8 @@
|
|||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
id("com.github.johnrengelman.shadow")
|
||||
|
||||
id("otel.java-conventions")
|
||||
id("otel.publish-conventions")
|
||||
}
|
||||
|
|
@ -19,6 +23,14 @@ dependencies {
|
|||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
val agentJar = project(":static-instrumenter:agent-instrumenter").tasks.getByName("shadowJar", ShadowJar::class)
|
||||
dependsOn(agentJar)
|
||||
from(agentJar.archiveFile) {
|
||||
rename { "opentelemetry-agent.jar" }
|
||||
}
|
||||
}
|
||||
|
||||
withType<JavaCompile>().configureEach {
|
||||
with(options) {
|
||||
release.set(11)
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
public class InstrumentationAgent {
|
||||
|
||||
// TODO: change after the new static-instr capable agent is released
|
||||
public static final String JAR_FILE_NAME = "opentelemetry-javaagent.jar";
|
||||
// TODO: change after the new static-instr capable agent is released
|
||||
public static final String MAIN_CLASS = "io.opentelemetry.javaagent.StaticInstrumenter";
|
||||
public static final String JAR_FILE_NAME = "opentelemetry-agent.jar";
|
||||
public static final String MAIN_CLASS =
|
||||
"io.opentelemetry.contrib.staticinstrumenter.agent.main.Main";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(InstrumentationAgent.class);
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue