lightstep / lightstep-tracer-java

The Lightstep distributed tracing library for JRE
https://lightstep.com
MIT License
44 stars 24 forks source link

add tracer-grpc with required dependencies to jre-bundle, shade okhttp #244

Closed malafeev closed 4 years ago

malafeev commented 4 years ago

243

what I found is that it's critical to test jre-bundle with real application. if I shade io.netty then tracer started but spans are not sent. Although unit tests passed. if I shade io.grpc then tracer failed to start. Although unit tests passed. therefore I shade only okhttp also it's important to verify that configured tracer collector is picked up (grpc or okhttp). I did it manually debugging test application and changing configuration. Without my changes in CollectorClientProvider grpc collector is never picked up.

so it's quite confusing that unit tests cannot verify functionality and manual testing with some debugging is required.

carlosalberto commented 4 years ago

Thanks for the PR @malafeev

What happens if the user uses the SA with the new bundle, and uses a grpc version different to the one we use?

And yes, it sounds like we will most likely need to do some extra digging into the grpc part. Historically handling of different grpc versions has been the most painful thing. okhttp shading is just a nice thing to have.

malafeev commented 4 years ago

@carlosalberto grpc should be shaded otherwise user can get incompatible grpc versions in classpath. Yes, I agree, we need to find a solution for proper grpc shading because straightforward shading doesn't work.

malafeev commented 4 years ago

@carlosalberto I fixed shading of grpc and netty :)