Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

question about using shadow dependency in jaeger-b3 #279

Closed
fandan-nyc opened this issue Nov 3, 2017 · 3 comments
Closed

question about using shadow dependency in jaeger-b3 #279

fandan-nyc opened this issue Nov 3, 2017 · 3 comments
Assignees
Milestone

Comments

@fandan-nyc
Copy link

Hi there
I have a quick question about the jaeger-b3 dependency. I saw that in this line

compile project(path: ':jaeger-core', configuration: 'shadow')

**Question:
We have the jaeger-core as the dependency. May I ask the reason why it has to be a shadow ?
Is there a way that we can manage the version of the dependencies ourselves ?
**
The following are more details of why we ask
The reason why I ask is that, the jaeger-core depends on jaeger-thrift which in turn depends on the old 4.2.X apache httpcore version.

org.apache.httpcomponents:httpcore:4.2.4 -> 4.3.3
\--- org.apache.thrift:libthrift:0.9.2
     \--- com.uber.jaeger:jaeger-thrift:0.21.0
          \--- com.uber.jaeger:jaeger-core:0.21.0
               +--- com.uber.jaeger:jaeger-jaxrs2:0.21.0
               |    \--- runtime
               \--- com.uber.jaeger:jaeger-b3:0.21.0
                    \--- runtime

We have some code which needs the 4.3.X apache httpcore version. There is a transitive dependency conflict in our case and there is no way we can override the transitive dependency in gradle. (I could be wrong. If there is a walkaround, please let me know. )
we tried

configurations.all {
    resolutionStrategy { 
        force 'org.apache.httpcomponents:httpcore:4.3.3'
    }
}

but it does not work since the dependency is transitive.

this is the related ticket we filed sometime ago, in which we have a sample code to reproduce this issue.
#232

Thanks a lot !

@felixbarny
Copy link
Contributor

Some stagemonitor users also reported this issue. What is the reason that jaeger-b3 depends on jaeger-core:okhttp381 and not jaeger-core?

I guess the quick fix is to remove the dependency to jaeger-core so that there is only jaeger-core:okhttp381 left. But as in this case okhttp is not needed I'd much rather have jaeger-b3 just depend on the normal jaeger-core.

felixbarny pushed a commit to stagemonitor/stagemonitor that referenced this issue Dec 12, 2017
jaeger-b3 comes with a transitive dependency to jaeger-core:okhttp381
see also jaegertracing/jaeger-client-java#279
@vprithvi
Copy link
Contributor

What is the reason that jaeger-b3 depends on jaeger-core:okhttp381 and not jaeger-core?

I don't think there is a good reason for it. At the time of writing, I believe there was in incompatibility between the version of okhttp bought in by io.zipkin.brave:brave-http and jaeger-core. I'll have a commit out shortly.

vprithvi added a commit that referenced this issue Dec 12, 2017
`jaeger-b3` depended on a shadow version of `jaeger-core` that packaged
`okhttp` to prevent an incompatibility with `io.zipkin.brave:brave-http`

The version of `brave-http` that we depend on currently doesn't have
this incompatibility, so depending on the shadow is unnecessary.

Fixes #279

Signed-off-by: Prithvi Raj <p.r@uber.com>
@ghost ghost assigned vprithvi Dec 12, 2017
@ghost ghost added the review label Dec 12, 2017
felixbarny pushed a commit to stagemonitor/stagemonitor that referenced this issue Dec 13, 2017
jaeger-b3 comes with a transitive dependency to jaeger-core:okhttp381
see also jaegertracing/jaeger-client-java#279
@yurishkuro yurishkuro added this to the 1.0 release milestone Jan 19, 2018
@objectiser
Copy link
Contributor

objectiser commented Jan 20, 2018

One thing to consider with this issue is that the B3 propagation is now part of the jaeger-core artifact so the jaeger-b3 is only providing backward compatibility support and tests (with their dependency on brave). See #296.

yurishkuro pushed a commit that referenced this issue Feb 1, 2018
`jaeger-b3` depended on a shadow version of `jaeger-core` that packaged
`okhttp` to prevent an incompatibility with `io.zipkin.brave:brave-http`

The version of `brave-http` that we depend on currently doesn't have
this incompatibility, so depending on the shadow is unnecessary.

Fixes #279

Signed-off-by: Prithvi Raj <p.r@uber.com>
@ghost ghost removed the review label Feb 1, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants