Skip to content

Conversation

jaydeluca
Copy link
Member

@jaydeluca jaydeluca commented Aug 7, 2025

Fixes #14382

When using Observable.fromCallable() with different schedulers (.subscribeOn()/.observeOn()), the context was not being propagated to the callable execution.

ObservableFromCallable is an internal class with a private callable, so I needed to do some reflection in the wrapper to make it work, but we now intercept and wrap the callable before it gets scheduled.

@jaydeluca jaydeluca requested a review from a team as a code owner August 7, 2025 20:23
@trask
Copy link
Member

trask commented Aug 12, 2025

@jaydeluca can you check if the test latest deps failure is related?

HibernateReactiveTest > initializationError FAILED
    java.lang.NoSuchMethodError: 'io.vertx.core.Future io.vertx.core.Context.executeBlocking(io.vertx.core.Handler)'
        at io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v2_0.HibernateReactiveTest.setUp(HibernateReactiveTest.java:78)

> Task :instrumentation:hibernate:hibernate-reactive-1.0:javaagent:hibernateReactive2Test FAILED

@jaydeluca
Copy link
Member Author

@jaydeluca can you check if the test latest deps failure is related?

@trask that testlatestDeps is happening on all PRs and I'm able to reproduce on main locally. There was a hibernate-reactive release that pulled in a newer version of vertx and changed some methods we use in our tests, so it should be unrelated to this PR

@trask trask merged commit 909bd48 into open-telemetry:main Aug 12, 2025
88 of 89 checks passed
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.

Context Propagation not supported In. RxJava

4 participants