Skip to content

[java-services] Update java, gradle and OTel agent versions#1183

Merged
puckpuck merged 7 commits intoopen-telemetry:mainfrom
julianocosta89:Java-Update-to-latest-LTS
Oct 20, 2023
Merged

[java-services] Update java, gradle and OTel agent versions#1183
puckpuck merged 7 commits intoopen-telemetry:mainfrom
julianocosta89:Java-Update-to-latest-LTS

Conversation

@julianocosta89
Copy link
Copy Markdown
Member

@julianocosta89 julianocosta89 commented Oct 17, 2023

Changes

This PR updates the java version on AdService to latest LTS Java (21).
Unfortunately, there is jvm target 21 for Kotlin yet, so for FraudDetection I've just update gradle to version 8.4.
Also bumped the Java OTel agent in the 3 services its being used.

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

@julianocosta89 julianocosta89 requested a review from a team October 17, 2023 10:59
Copy link
Copy Markdown
Contributor

@cedricziel cedricziel left a comment

Choose a reason for hiding this comment

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

lgtm

@cyrille-leclerc
Copy link
Copy Markdown
Member

It's a great improvement to use Log4j2 so logs can be captured via auto-instrumentation and send through OTLP.

Did you consider enabling otel.logs.exporter=otlp / OTEL_LOGS_EXPORTER=otlp
the same way it is done on the Java adservice (done through an env variable) and the Python recommendationservice (done through code):

@julianocosta89
Copy link
Copy Markdown
Member Author

It's a great improvement to use Log4j2 so logs can be captured via auto-instrumentation and send through OTLP.

Did you consider enabling otel.logs.exporter=otlp / OTEL_LOGS_EXPORTER=otlp the same way it is done on the Java adservice (done through an env variable) and the Python recommendationservice (done through code):

AFAIK otlp is the default logs exporter, isn't it?

In this PR I'm also adding log4j2 to the Kotlin service, so we also have OTLP traces for FraudDetection.
AdService has it already.

Am I missing something @cyrille-leclerc ?

@cedricziel
Copy link
Copy Markdown
Contributor

cedricziel commented Oct 19, 2023

The java-otel README for the autoconfigurer states:

| otel.logs.exporter    | OTEL_LOGS_EXPORTER    | List of exporters to be used for logging, separated by commas. Default is `otlp`. `none` means no autoconfigured exporter. |

https://github.com/open-telemetry/opentelemetry-java/blob/57d83344178f578eb5d2f043b0ffc5c42b6719a5/sdk-extensions/autoconfigure/README.md?plain=1#L79

To my understanding, we should be good with the current change that @julianocosta89 is proposing 👍

@cyrille-leclerc
Copy link
Copy Markdown
Member

You are right, nothing to do in the demo. Logs auto instrumentation got enabled by default in 1.27.0 but the release notes of the auto-instrumentation agent didn't mention it, it just appeared on the release notes of he auto-configure-sdk:

@puckpuck puckpuck merged commit 121ed21 into open-telemetry:main Oct 20, 2023
@cyrille-leclerc
Copy link
Copy Markdown
Member

cyrille-leclerc commented Oct 20, 2023

@julianocosta89
Copy link
Copy Markdown
Member Author

@cyrille-leclerc the logs are already enabled for AdService, and this PR adds it to the FraudDetectionService.

I'm not sure what you would like to add.

Please feel free to send a PR with your suggestions.

Dylan-M pushed a commit to observIQ/opentelemetry-demo that referenced this pull request Oct 25, 2023
…emetry#1183)

* Update AdService to Java version 21

* Add log and update dependencies

* Bump java agent

* Changelog

* lint
julianocosta89 added a commit to open-telemetry/opentelemetry.io that referenced this pull request Nov 21, 2023
Logs were added to Fraud Detection Service in open-telemetry/opentelemetry-demo#1183
@julianocosta89 julianocosta89 deleted the Java-Update-to-latest-LTS branch January 9, 2024 16:43
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
…emetry#1183)

* Update AdService to Java version 21

* Add log and update dependencies

* Bump java agent

* Changelog

* lint
mohamed3637 added a commit to mohamed3637/opentelemetry-demo that referenced this pull request Oct 7, 2025
…emetry#1183)

* Update AdService to Java version 21

* Add log and update dependencies

* Bump java agent

* Changelog

* lint
cloud-hb pushed a commit to cloud-hb/opentelemetry-demo that referenced this pull request Nov 17, 2025
…emetry#1183)

* Update AdService to Java version 21

* Add log and update dependencies

* Bump java agent

* Changelog

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants