Skip to content

Conversation

brunobat
Copy link
Contributor

@brunobat brunobat commented Jun 24, 2025

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

If the value is not supported, we should update the config to indicate that and also provide a good error message

This comment has been minimized.

Copy link

github-actions bot commented Jun 24, 2025

🙈 The PR is closed and the preview is expired.

@spio
Copy link

spio commented Jun 25, 2025

Hi, Bruno.

It seems good to me.

I would suggest some more changes to the docs:

  • In the description of the "quarkus.otel.traces.exporter" property (under both titles "OpenTelemetry Configuration Reference" and "Disable all or parts of the OpenTelemetry extension"), I think that the "otlp" option shoud be removed as a valid value, because it is not.
  • By removing that value, the new section "The OpenTelemetry OTLP exporter" it's not necessary; in fact, it seems too severe to me to say "This is currently not supported in quarkus"; perhaps stating that "this is used by default in Quarkus" instead of that sentence is a little more polite.
  • I think that adding a quick link to database tracing there could be useful.

And one last thing, but it is not fully related to this: it seems strange to me that, by default, direct jdbc connections are not traced by default (i.e. quarkus.datasource.jdbc.telemetry=false), but reactive connections are (quarkus.otel.instrument.vertx-sql-client=true). By the way, if you can, I would suggest to also modify the Quarkus Datasource config docs (https://es.quarkus.io/guides/datasource) to show, under the "Datasource tracing" title, that each datasource can be configured using "quarkus.datasource..jdbc.telemetry=true", as it is shown under "Datasource health check", "Datasource metrics" and "Narayana transaction manager integration".

Regards.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I added a few suggestions.

I agree with @geoand that we should improve the error we get.

The current error (coming from the issue):

Caused by: java.lang.ClassNotFoundException: okhttp3.Callback
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:576)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:523)

Given we are not supposed to use Okhttp at all, this is extremely puzzling and I don't think adding some doc is enough. The additional doc is highly welcome though :)

@geoand
Copy link
Contributor

geoand commented Jul 1, 2025

@brunobat do you plan to update the PR as per the recommendations? Asking because the current state is less than optimal

@spio
Copy link

spio commented Jul 1, 2025

I added a few suggestions.

I agree with @geoand that we should improve the error we get.

The current error (coming from the issue):

Caused by: java.lang.ClassNotFoundException: okhttp3.Callback
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:576)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:523)

Given we are not supposed to use Okhttp at all, this is extremely puzzling and I don't think adding some doc is enough. The additional doc is highly welcome though :)

@gsmet , this error occurs because of a combination of factors that should be resolved with the corrections in the docs made by @brunobat; in fact, it is an unhappy combination of factors:
1 - io.opentelemetry:opentelemetry-exporter-otlp uses OKHttp3. But Quarkus OpenTelemetry does not really need that. So, the problem should not arise in first place if a project does not include that dependency.
2 - Quarkus 3.20 OpenTelemetry has a dependency (although it is not used) on io.opentelemetry:opentelemetry-exporter-otlp:1.44.0, which in turn depends on an old version of OKHttp3, which has a bug (precisely, the class okhttp3.Callback is missing). But, if you, in a project, do not set otlp as an exporter, the problem won't arise either, because it will not try to use that class.
3 - If you, in a project, override the io.opentelemetry:opentelemetry-exporter-otlp version with 1.44.1, the ClassNotFoundException disapears, because it depends on a newer version of OkHttp3. But, as I understand, you should not include a dependency on io.opentelemetry : opentelemetry-exporter-otlp in a Quarkus Project (again, Quarkus 3.20 Telemetry has a dependency on it, but if you do not set otlp as an exporter, which is now un-documented, then that should not be a problem).

@brunobat
Copy link
Contributor Author

brunobat commented Jul 2, 2025

This is on hold due to other ongoing work.

@brunobat brunobat force-pushed the otlp-exporter-doc-improvements branch from d70708e to 0bcb114 Compare July 14, 2025 14:34
@brunobat brunobat requested a review from geoand July 14, 2025 14:34
@brunobat
Copy link
Contributor Author

Dependency removed and error message thown on build.

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

I added a minor comment. I would also like to have @gsmet's suggestions applied

@brunobat brunobat force-pushed the otlp-exporter-doc-improvements branch from 0bcb114 to 2ee3eb1 Compare July 14, 2025 14:39
@brunobat brunobat force-pushed the otlp-exporter-doc-improvements branch from 2ee3eb1 to 828775b Compare July 14, 2025 14:50
@brunobat
Copy link
Contributor Author

It should be better now, @geoand

Copy link

quarkus-bot bot commented Jul 14, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 828775b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Jul 14, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 828775b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Integration Tests - JDK 17

📦 integration-tests/kafka-devservices

io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231)
	at io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange(DevServicesDevModeTest.java:81)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/kafka-devservices

io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231)
	at io.quarkus.it.kafka.continuoustesting.DevServicesDevModeTest.testDevModeServiceDoesNotRestartContainersOnCodeChange(DevServicesDevModeTest.java:81)

@brunobat brunobat merged commit b84f13b into quarkusio:main Jul 14, 2025
37 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.25 - main milestone Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants