Skip to content

Spring Boot Application, Dockerized with Jib Maven Plugin, Open Telemetry Java agent auto instrumentation

Notifications You must be signed in to change notification settings

oalles/otel-jib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This repository contains an example on how to instrument a Spring Boot application, dockerized using Jib Maven Plugin, with Open Telemetry.

JDK: 17

OpenTelemetry Java Agent

OpenTelemetry Java Agent is download an installed in src/main/data/otel folder.

https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.14.0/opentelemetry-javaagent.jar

Check the <configuration> section in the jib-maven-plugin plugin configuration:

<from>
    <image>gcr.io/distroless/java17-debian11</image>
</from>
<container>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
<jvmFlags>
    <jvmFlag>-javaagent:/data/otel/opentelemetry-javaagent.jar</jvmFlag>
</jvmFlags>
</container>
<extraDirectories>
<paths>
    <!-- Copies from 'src/main/data' into '/data' on the container -->
    <path>
        <from>src/main/data</from>
        <into>/data</into>
    </path>
</paths>
</extraDirectories>

Signoz

For this project we use Signoz as monitoring tool.

$ git clone https://github.com/SigNoz/signoz; cd signoz/deploy
$ docker-compose -f docker/clickhouse-setup/docker-compose.yaml up
# open browser: localhost:3301, First account created - admin

Build and Deploy

# Go to project root
$ cd otel-jib
$ mvn compile jib:dockerBuild # local docker daemon
$ docker-compose -f deployment/docker-compose.yaml up

Containerizing Java App

Some useful links:

About

Spring Boot Application, Dockerized with Jib Maven Plugin, Open Telemetry Java agent auto instrumentation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages