openzipkin-contrib / brave-ratpack

Brave instrumentation for Ratpack
Apache License 2.0
5 stars 4 forks source link

TracingPropagationExecInitializer searching for wrong class in registry entries. #14

Closed kirenjolly closed 5 years ago

kirenjolly commented 5 years ago

init function in TracingPropagationExecInitializer is trying to get HttpTracing.class from the execution object i pass but instead it should maybeGet(TraceContextHolder.class). Since in my registry entries only this is present. RegistryEntry{type=ratpack.zipkin.internal.RatpackCurrentTraceContext$TraceContextHolder, value=ratpack.zipkin.internal.RatpackCurrentTraceContext$TraceContextHolder@6139672b}. Hence httpTracing is always null in init.

So init can't be used for manual setting of TraceContext on passing the current Execution because at that point RatpackCurrentTraceContext$TraceContextHolder will be having the CurrentTraceContext and not HttpTracing.class

kirenjolly commented 5 years ago

@devinsba @llinder Please Correct me if i am wrong. Because this function(init) is what we are using as a workaround for context propagation in ratpack promises and async calls

codefromthecrypt commented 5 years ago

can you raise a pull request? it looks like you know where the problem might be

codefromthecrypt commented 5 years ago

basically if you can put a test that fails until a change is made.. and also that change. it will be a great way of unblocking yourself :P

kirenjolly commented 5 years ago

Yeah i will create a test for both the cases and raise a PR for that.