Skip to content

Commit 9e84dd2

Browse files
author
brunnert
committed
Merge branch 'main' into ferdinand-gutzy-add-data-to-spans
2 parents 704e9a2 + 9f41d37 commit 9e84dd2

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

.github/workflows/maven.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929
cache: maven
3030
- name: Build with Maven
3131
run: mvn -B package --file pom.xml
32+
- name: Integration Test with Maven
33+
run: mvn -B test -Dtest=JavaAgentExtensionIntegrationTest --file ./extension/pom.xml
3234

3335
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3436
#- name: Update dependency graph
35-
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
37+
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
38+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ local.properties
6363
.vscode
6464

6565
# Maven
66-
de.retit.apm/de.retit.apm.javaagent.sampleapplication/dependency-reduced-pom.xml
66+
de.retit.apm/de.retit.apm.javaagent.sampleapplication/dependency-reduced-pom.xml
67+
/sampleapplication/dependency-reduced-pom.xml

extension/src/test/java/io/retit/opentelemetry/javaagent/extension/JavaAgentExtensionIntegrationTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ class JavaAgentExtensionIntegrationTest {
3434

3535
@BeforeEach
3636
public void setupApplication() {
37-
String image = "registry.retit-support.de/brunnert/docker/otel-integration-test:feature";
37+
String image = "otel-integration-test:feature";
3838
LOGGER.info("Using image: " + image);
3939
applicationContainer = new GenericContainer<>(image)
40+
.withEnv("OTEL_LOGS_EXPORTER", "none")
4041
.withEnv("OTEL_METRICS_EXPORTER", "none")
41-
.withEnv("OTEL_TRACES_EXPORTER", "logging");
42+
.withEnv("OTEL_TRACES_EXPORTER", "logging")
43+
.withEnv("JAVA_TOOL_OPTIONS", "-javaagent:opentelemetry-javaagent-all.jar -Dotel.javaagent.extensions=io.retit.opentelemetry.javaagent.extension.jar");
4244
spanDemands = new HashMap<>();
4345
}
4446

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<dependency>
7474
<groupId>io.opentelemetry.javaagent</groupId>
7575
<artifactId>opentelemetry-javaagent</artifactId>
76-
<version>1.27.0</version>
76+
<version>2.6.0</version>
7777
<scope>test</scope>
7878
</dependency>
7979

sampleapplication/pom.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<resource>
9999
<directory>${project.build.directory}</directory>
100100
<includes>
101-
<include>io.retit.opentelemetry.javaagent.sampleapplication-${project.version}.jar
101+
<include>sampleapplication-${project.version}.jar
102102
</include>
103103
</includes>
104104
</resource>
@@ -116,7 +116,7 @@
116116
<image>openjdk:17-slim</image>
117117
</from>
118118
<to>
119-
<image>registry.retit-support.de/brunnert/docker/otel-integration-test:${project.version}</image>
119+
<image>otel-integration-test:${project.version}</image>
120120
<tags>
121121
<tag>feature</tag>
122122
</tags>
@@ -127,12 +127,15 @@
127127
<path>${project.build.directory}/jib</path>
128128
</paths>
129129
</extraDirectories>
130-
<container>
131-
<entrypoint>
132-
java,-javaagent:opentelemetry-javaagent-all.jar,-Dotel.javaagent.extensions=io.retit.opentelemetry.javaagent.extension.jar,-cp,io.retit.opentelemetry.javaagent.sampleapplication-${project.version}.jar,SampleApplication
133-
</entrypoint>
134-
</container>
135130
</configuration>
131+
<executions>
132+
<execution>
133+
<phase>package</phase>
134+
<goals>
135+
<goal>dockerBuild</goal>
136+
</goals>
137+
</execution>
138+
</executions>
136139
</plugin>
137140
<plugin>
138141
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)