Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
97e838f
Enable Test_TelemetryEnhancedConfigReporting for java 1.53.0-SNAPSHOT
mtoffl01 Sep 23, 2025
cf5735d
Merge branch 'main' into mtoff/java-config-sources
mtoffl01 Sep 23, 2025
4eb824d
Merge branch 'main' into mtoff/java-config-sources
mtoffl01 Sep 24, 2025
1d67eb0
Apply for spring-boot only
mtoffl01 Sep 24, 2025
a05e1b7
Try mounting ConfigChaining for more libs
mtoffl01 Sep 24, 2025
1dfab01
run formatter
mtoffl01 Sep 24, 2025
fe1c349
Apply ConfigChaining mount for all java dockerfiles
mtoffl01 Sep 25, 2025
d1c7135
Use v1.54.0-SNAPSHOT for Test_TelemetryEnhancedConfigReporting
mtoffl01 Sep 26, 2025
8354010
Merge branch 'main' into mtoff/java-config-sources
mtoffl01 Sep 26, 2025
446528c
disable for graalvm
mtoffl01 Sep 26, 2025
568ce6c
Apply JVM args to openliberty
mtoffl01 Sep 29, 2025
a80d551
Revert app.sh command to previous state
mtoffl01 Sep 29, 2025
3c6fb24
Put JVM_ARGS in app start command
mtoffl01 Sep 30, 2025
e98241d
Remove JVM_ARGS from app start cmd
mtoffl01 Sep 30, 2025
4b96513
Modify openliberty dockerfile to use /app/ConfigChaining.properties
mtoffl01 Oct 3, 2025
236a990
remove reverse ordering
mtoffl01 Oct 3, 2025
06df82e
linter
mtoffl01 Oct 3, 2025
a9fc107
remove superfluous comment on openliberty dockerfile
mtoffl01 Oct 3, 2025
8790c6c
Use /app/ConfigChaining for config file path in scenario; remove from…
mtoffl01 Oct 6, 2025
b8ab89c
Clarify file-based origin wording
mtoffl01 Oct 6, 2025
25743d5
Merge branch 'main' into mtoff/java-config-sources
mtoffl01 Oct 6, 2025
66a8ee4
Remove duplicate in openliberty dockerfile
mtoffl01 Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2338,8 +2338,10 @@ tests/:
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
Test_Telemetry:
'*': v0.108.1
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
Test_TelemetryEnhancedConfigReporting: missing_feature
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_TelemetryEnhancedConfigReporting:
'*': v1.54.0-SNAPSHOT
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_TelemetrySCAEnvVar: missing_feature
Test_TelemetryV2: v1.23.0
test_v1_payloads.py: missing_feature
5 changes: 4 additions & 1 deletion tests/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,10 @@ class Test_TelemetryEnhancedConfigReporting:
"name": "logs_injection_enabled",
"precedence": [
{"origin": "default", "value": "true"},
{"origin": "jvm_prop", "value": "true"},
{
"origin": "jvm_prop",
"value": "true",
}, # File-based properties have a lower precedence than env_var: https://github.com/DataDog/dd-trace-java/blob/5c66a150ff3b16ebf9626c0f0170fc9715461a6b/utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider/ConfigProvider.java#L507-L514
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}, # File-based properties have a lower precedence than env_var: https://github.com/DataDog/dd-trace-java/blob/5c66a150ff3b16ebf9626c0f0170fc9715461a6b/utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider/ConfigProvider.java#L507-L514
}, # File-based properties have a lower precedence than env_var (different that System Properties which have the same origin but a higher precedence than env_var): https://github.com/DataDog/dd-trace-java/blob/5c66a150ff3b16ebf9626c0f0170fc9715461a6b/utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider/ConfigProvider.java#L507-L514

Not necessarily this wording, but I do feel like it makes sense to state that there is a nuance between origin and the actual source that is used.

{"origin": "env_var", "value": "false"},
],
},
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/akka-http.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/my-akka-http-app-1.0.0-allinone.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/jersey-grizzly2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/jersey-grizzly2-1.0-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/play.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/dist/play-app-1.0.0 .
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app-play.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/ratpack.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/ratpack-1.0-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/resteasy-netty3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/resteasy-netty3-1.0-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/spring-boot-3-native.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ COPY --from=build /app/without-profiling/myproject ./without-profiling/
ENV DD_TRACE_HEADER_TAGS='user-agent:http.request.headers.user-agent'
ENV DD_TRACE_INTERNAL_EXIT_ON_FAILURE=true

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app-native-profiling.sh app.sh
RUN chmod +x app.sh
CMD [ "/app/app.sh" ]
1 change: 1 addition & 0 deletions utils/build/docker/java/spring-boot-jetty.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/myproject-0.0.1-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE

COPY --from=build /app/target/myproject-0.0.1-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .
COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties

ENV DD_TRACE_HEADER_TAGS='user-agent:http.request.headers.user-agent'
# FIXME: Fails on APPSEC_BLOCKING, see APPSEC-51405
# ENV DD_TRACE_INTERNAL_EXIT_ON_FAILURE=true

ENV JVM_ARGS='-javaagent:/app/dd-java-agent.jar'
COPY ./utils/build/docker/java/ConfigChaining.properties app/ConfigChaining.properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPY ./utils/build/docker/java/ConfigChaining.properties app/ConfigChaining.properties

Duplicate from above

ENV JVM_ARGS='-javaagent:/app/dd-java-agent.jar -Ddd.trace.config=/app/ConfigChaining.properties'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you tested this already, but is it possible to change this in the definition of the Scenario? AKA would updating DD_TRACE_CONFIG to/app/ConfigChaining.properties work for all weblog apps? 🤔


RUN echo "#!/bin/bash\njava -Xmx362m -jar /app/app.jar" > app.sh
RUN chmod +x app.sh
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/spring-boot-payara.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY --from=build /dd-tracer/dd-java-agent.jar .
COPY --from=build /binaries/payara-micro.jar /app/payara-micro.jar
COPY --from=build /root/.m2/repository/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar /app/stax2-api-4.2.1.jar

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app-payara.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/spring-boot-undertow.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/myproject-0.0.1-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/spring-boot-wildfly.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/myproject-0.0.1-SNAPSHOT-bootable.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
2 changes: 1 addition & 1 deletion utils/build/docker/java/spring-boot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COPY --from=build /app/target/myproject-0.0.1-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/opentelemetry-javaagent-r2dbc.jar .
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/spring-boot/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/uds-spring-boot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ COPY utils/build/docker/set-uds-transport.sh set-uds-transport.sh
ENV DD_APM_RECEIVER_SOCKET=/var/run/datadog/apm.socket
RUN apt-get update && apt-get install socat -y
ENV UDS_WEBLOG=1
COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY utils/build/docker/java/spring-boot/app.sh app.sh
1 change: 1 addition & 0 deletions utils/build/docker/java/vertx3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/vertx3-1.0-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/java/vertx4.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY --from=build /binaries/SYSTEM_TESTS_LIBRARY_VERSION SYSTEM_TESTS_LIBRARY_VE
COPY --from=build /app/target/vertx4-1.0-SNAPSHOT.jar /app/app.jar
COPY --from=build /dd-tracer/dd-java-agent.jar .

COPY ./utils/build/docker/java/ConfigChaining.properties /app/ConfigChaining.properties
COPY ./utils/build/docker/java/app.sh /app/app.sh
RUN chmod +x /app/app.sh

Expand Down
Loading