easy-agent-plugin-istio-tracing

Plugin of easy-agent for istio distributed tracing.

License

License

GroupId

GroupId

software.fitz
ArtifactId

ArtifactId

easy-agent-plugin-istio-tracing
Last Version

Last Version

0.4.0-RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

easy-agent-plugin-istio-tracing
Plugin of easy-agent for istio distributed tracing.
Project URL

Project URL

https://github.com/joongsoo/easy-agent-plugin-istio-tracing
Source Code Management

Source Code Management

https://github.com/joongsoo/easy-agent-plugin-istio-tracing

Download easy-agent-plugin-istio-tracing

How to add to project

<!-- https://jarcasting.com/artifacts/software.fitz/easy-agent-plugin-istio-tracing/ -->
<dependency>
    <groupId>software.fitz</groupId>
    <artifactId>easy-agent-plugin-istio-tracing</artifactId>
    <version>0.4.0-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/software.fitz/easy-agent-plugin-istio-tracing/
implementation 'software.fitz:easy-agent-plugin-istio-tracing:0.4.0-RELEASE'
// https://jarcasting.com/artifacts/software.fitz/easy-agent-plugin-istio-tracing/
implementation ("software.fitz:easy-agent-plugin-istio-tracing:0.4.0-RELEASE")
'software.fitz:easy-agent-plugin-istio-tracing:jar:0.4.0-RELEASE'
<dependency org="software.fitz" name="easy-agent-plugin-istio-tracing" rev="0.4.0-RELEASE">
  <artifact name="easy-agent-plugin-istio-tracing" type="jar" />
</dependency>
@Grapes(
@Grab(group='software.fitz', module='easy-agent-plugin-istio-tracing', version='0.4.0-RELEASE')
)
libraryDependencies += "software.fitz" % "easy-agent-plugin-istio-tracing" % "0.4.0-RELEASE"
[software.fitz/easy-agent-plugin-istio-tracing "0.4.0-RELEASE"]

Dependencies

compile (1)

Group / Artifact Type Version
software.fitz : easy-agent-api jar 0.4.0-RELEASE

provided (4)

Group / Artifact Type Version
org.springframework : spring-web jar 4.0.0.RELEASE
org.apache.tomcat.embed : tomcat-embed-core jar 7.0.0
org.apache.httpcomponents : httpclient jar 4.4
org.apache.httpcomponents : httpcore jar 4.4

Project Modules

There are no modules declared in this project.

easy-agent-plugin-istio-tracing

This project is plugin of easy-agent for istio distributed tracing.

Istio distributed tracing : https://istio.io/docs/tasks/observability/distributed-tracing/


How to use

1. Add dependency to pom.xml (maven)

<dependency>
    <groupId>software.fitz</groupId>
    <artifactId>easy-agent-core</artifactId>
    <version>0.4.0-RELEASE</version>
</dependency>
<dependency>
    <groupId>software.fitz</groupId>
    <artifactId>easy-agent-plugin-istio-tracing</artifactId>
    <version>0.4.0-RELEASE</version>
</dependency>

2. Initialize the easy-agent and add IstioInterceptor in your premain-class

public class PremainClass {

    public static void premain(String agentArgs, Instrumentation instrumentation) {

        EasyAgentBootstrap.initialize(agentArgs, instrumentation)
                .addPlugin(new IstioDistributedTracePlugin())
                .start();
    }
}

3. Add maven plugin to your pom.xml for build agent jar

  1. Replace {your-jar-name} with the name of the jar you want.
  2. Replace {package.to.premain-class} with a class that implements the premain method.

Reference : easy-agent repository

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.2</version>
    <executions>
        <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
            <configuration>
                <finalName>{your-jar-name}</finalName>
                <appendAssemblyId>false</appendAssemblyId>
                <archive>
                    <manifest>
                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                        <Premain-Class>{package.to.premain-class}</Premain-Class>
                        <Can-Retransform-Classes>true</Can-Retransform-Classes>
                        <Can-Redefine-Classes>true</Can-Redefine-Classes>
                        <Boot-Class-Path>{your-jar-name}.jar</Boot-Class-Path>
                    </manifestEntries>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </execution>
    </executions>
</plugin>

4. Used it

Pass your agent jar file path to JVM argument

java -javaagent:/path/{your-agent}.jar -jar application.jar



Versions

Version
0.4.0-RELEASE