New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rxjava 2 #2130
Rxjava 2 #2130
Conversation
Dear reviewers, I need some help with this build. It fails while locally I can assemble the project. |
@iNikem @trask @anuraaga any ideas on helping @piotr-sumo here? |
@piotr-sumo Can you run tests in the main branch of this repo? I mean, is this problem of this PR or your environment in general? |
@iNikem I will run tests on |
@iNikem I've run tests from fresh master on jdk 15 and it fails unfortunately.
Do you have any ideas how to fix it? |
@piotr-sumo Do you mind pasting the larger stack trace there? |
@anuraaga this is one of the failing tests:
|
@piotr-sumo Are you using any VPN or proxy server? |
@mateuszrzeszutek Yes, I have corporate VPN turned on. Let me run those tests with VPN disabled. |
@mateuszrzeszutek withouth VPN I get
|
Do you have any local Docker setup/conf that could prevent from pulling images from Docker Hub? |
…umentation into rxjava-2
I came across testcontainers/testcontainers-java#3574 and pulled that image manually. I've also merged latest |
A, if this testcontainers bug (or we use too old version) and your local env works after pulling image manually, then problem solved, right? |
@iNikem it is almost solved. I get |
|
||
dependencies { | ||
implementation group: 'org.reactivestreams', name: 'reactive-streams', version: '1.0.0' | ||
library group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this instrumentation use rxjava, it seems to only instrument reactive streams? I couldn't find any usage outside of tests. If so we can name the instrumentation reactivestreams (we'd probably want to add tests with reactor too). Also I wonder how this instrumentation interops with other reactivestreams instrumentation we have, such as reactor
.
Also for this instrumentation especially, I think it would help to start with library instrumentation instead of javaagent instrumentation - It uses so much bytecode instrumentation I don't think we could extract a library for it. An example library that instruments rxjava2 for context propagation is https://github.com/line/armeria/tree/master/rxjava2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was porting DD instrumentation as mentioned here #1866. And the DD instrumentation uses javaagent instrumentation (https://github.com/DataDog/dd-trace-java/tree/master/dd-java-agent/instrumentation/rxjava-2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piotr-sumo Would you be able to help us by extracting this into library instrumentation? Going forward we do want to make sure we have it where we can. If it's too much for now though, I think this time we can stick with this and refactor (a fair amount I guess) later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuraaga Sure, I'd like to contribute and extract this into library instrumentation. First, I'll familiarise myself with https://github.com/line/armeria/tree/master/rxjava2 and proceed with library instrumentation for rxjava-2
.
RxJava2 library instrumentation PR can be found here #2191 |
@piotr-sumo just to check, do you plan to finish this PR now when #2191 is merged? |
@iNikem yes, I'm working on this now |
@iNikem @mateuszrzeszutek @anuraaga could you review my changes? |
@piotr-sumo Can you rework this to use the library instrumentation? We like the agent to just register library instrumentation whenever it can and it will make this a lot smaller. I think we can instrument |
@piotr-sumo Yup, it's great we have library instrumentation since now we can use it from this javaagent instrumentation :) We do need javaagent instrumentation but it should be implementable with a small amount of code that just initializes the library instrumentation instead of reimplementing it. We use a similar pattern for reactor and it actually answered my question on how to run code post-static initializer :D |
@anuraaga thanks for the hint! I will apply it! |
@anuraaga I've applied your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -11,6 +11,7 @@ import groovy.transform.stc.ClosureParams | |||
import groovy.transform.stc.SimpleType | |||
import io.opentelemetry.instrumentation.testing.util.TelemetryDataUtil | |||
import io.opentelemetry.sdk.trace.data.SpanData | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:+1
@anuraaga @mateuszrzeszutek could you re-run the checks? It failed on part that is not related to my commit. Unfortunately I don't have permissions to trigger re-run myself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
...ent/src/main/java/io/opentelemetry/instrumentation/rxjava2/RxJava2InstrumentationModule.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
No description provided.