-
Notifications
You must be signed in to change notification settings - Fork 13
pick up rebranded remoting change #100
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
Conversation
versions.props
Outdated
| com.google.guava:* = 18.0 | ||
| com.palantir.baseline:* = 0.29.4 | ||
| com.palantir.remoting3:* = 3.5.1 | ||
| com.palantir.tracing:* = 1.1.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.
@qinfchen Do we have a gradle substitute rule for this for downstream consumers?
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.
actually, nevermind as we're changing packages as well so consumers can have both remoting3 & new tracing coexist peacefully, though we'll want all tracing using a single Tracer
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.
having both co-existing is actually quite concerning though, because if com.palantir.remoting3.Tracer#getTraceId() and com.palantir.tracing.Tracer#getTraceId() disagree then you'd be in a pretty weird state. Also the logging subscribers will probably only be attached to one of them!
d8c91fe to
53b8bce
Compare
iamdanfox
left a comment
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 we take a few mins to plan how we do this seamlessly?
|
Why would we rebrand tracing? Doesn't it just break all of our tracing? |
|
It's all based around thread locals, you need everyone to be using the same thread locals :( |
tritium-tracing/build.gradle
Outdated
| api project(':tritium-api') | ||
| api project(':tritium-core') | ||
| api 'com.palantir.remoting3:tracing' | ||
| api 'com.palantir.tracing:tracing-api' |
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 even need to be api?
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.
moving tracing to implementation
schlosna
left a comment
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.
Putting on hold per @iamdanfox & @j-baker discussion around coalescing from remoting3 to single Tracer
|
OK here's a proposal:
|
53b8bce to
daefee9
Compare
|
@iamdanfox 's proposal sounds reasonable to me. Should we have similar plumbing & state checks for https://github.com/palantir/http-remoting/blob/2.6.3/tracing/src/main/java/com/palantir/remoting2/tracing/Tracer.java |
|
@schlosna from 3.43.0 onwards, remoting3's tracing delegates to the shiny new tracing jars so I think this is now ready to consider merging again! |
|
@iamdanfox we probably need to force folks to upgrade to remoting3 3.43.0+ before I can merge this. |
schlosna
left a comment
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.
@iamdanfox I think I'm happy with this now. I added some defensive code here to try and prevent double tracing where folks still have an older http-remoting3 tracer.
|
|
||
| private static boolean shouldUseJavaTracing() { | ||
| // ugly but avoids double traces if old http-remoting3 tracing does not delegate to java-tracing | ||
| Runnable wrappedTrace = com.palantir.remoting3.tracing.Tracers.wrap(() -> { |
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.
Ideally, I'd prefer not to require this class on the classpath. What about using reflection to just test for the existence of this class, then use .getPackage().getImplementationVersion()?
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.
Yeah, I can adjust this to test using reflection and fallback to reflection for slow path when old remoting3 is detected. I won’t keep that in tritium long term, but know there are some places that won’t get both excavated together, so want some transition time.
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.
Do you have a time frame you need this change & release?
|
@iamdanfox Updated to use reflection check & fallback to reflection. Let me know if this looks good to you and I'll merge & tag a build |
Log error and fallback to remoting3 tracing if the detected remoting3 tracer does not delegate to java-tracing properly.
schlosna
left a comment
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.
There are significant performance slow downs using the new com.palantir.tracing.Tracer implementation as evidenced by jmh, see
#115 (comment):
Before, using com.palantir.remoting3:tracing on develop:
Benchmark Mode Cnt Score Error Units
ProxyBenchmark.instrumentedWithEverything avgt 5 882.844 ± 52.446 ns/op
ProxyBenchmark.instrumentedWithTracing avgt 5 450.734 ± 74.964 ns/op
ProxyBenchmark.instrumentedWithMetrics avgt 5 352.870 ± 5.791 ns/op
ProxyBenchmark.instrumentedWithPerformanceLogging avgt 5 17.203 ± 0.932 ns/op
ProxyBenchmark.raw avgt 5 3.001 ± 0.232 ns/op
After, using com.palantir.tracing.Tracer on ds/java-tracing:
Benchmark Mode Cnt Score Error Units
ProxyBenchmark.instrumentedWithEverything avgt 5 1447.724 ± 26.477 ns/op
ProxyBenchmark.instrumentedWithTracing avgt 5 630.983 ± 18.414 ns/op
ProxyBenchmark.instrumentedWithMetrics avgt 5 355.538 ± 9.785 ns/op
ProxyBenchmark.instrumentedWithPerformanceLogging avgt 5 17.266 ± 0.511 ns/op
ProxyBenchmark.raw avgt 5 2.912 ± 0.061 ns/op
3e56913 to
91713b6
Compare
91713b6 to
a820321
Compare
remoting-tracing has been moved to https://github.com/palantir/tracing-java