opentracing / opentracing-java

OpenTracing API for Java. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.68k stars 344 forks source link

Breaking change from 0.31 to 0.33 #377

Open rupinder10 opened 4 years ago

rupinder10 commented 4 years ago

The following code doesnt work in 0.33 from the examples

tracer.extract(Format.Builtin.HTTP_HEADERS, new TextMapExtractAdapter(headers));

This is because TextMapExtractAdapter no longer implements TextMap in 0.33. So what is the alternate code in 0.33 ?

yurishkuro commented 4 years ago

TextMapAdapter implements full TextMap interface: https://github.com/opentracing/opentracing-java/blob/master/opentracing-api/src/main/java/io/opentracing/propagation/TextMapAdapter.java#L26

asad-awadia commented 4 years ago

Why is the override for TextMapAdapter put instead of a get

It is an extract from HTTP headers, right? - Shouldn't it be getting the B3 headers from the request? instead of putting stuff in the map?

yurishkuro commented 4 years ago

The following code doesnt work in 0.33 from the examples

@rupinder10 which example are you referring to?

rupinder10 commented 4 years ago

It was in one of the examples on the opentracing site. Anyway, changing to TextMapAdapter works.

On Sun, May 10, 2020 at 12:16 PM Yuri Shkuro notifications@github.com wrote:

The following code doesnt work in 0.33 from the examples

@rupinder10 https://github.com/rupinder10 which example are you referring to?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opentracing/opentracing-java/issues/377#issuecomment-626351808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB56UZYTYGZXQISBP2GI623RQ3HMNANCNFSM4MXSUQVA .

asad-awadia commented 4 years ago

https://opentracing.io/guides/java/inject-extract/

this one

yurishkuro commented 4 years ago

please propose a PR to fix it