opentracing-java icon indicating copy to clipboard operation
opentracing-java copied to clipboard

Breaking change from 0.31 to 0.33

Open rupinder10 opened this issue 4 years ago • 6 comments

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 ?

rupinder10 avatar May 02 '20 08:05 rupinder10

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

yurishkuro avatar May 10 '20 02:05 yurishkuro

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?

asad-awadia avatar May 10 '20 14:05 asad-awadia

The following code doesnt work in 0.33 from the examples

@rupinder10 which example are you referring to?

yurishkuro avatar May 10 '20 16:05 yurishkuro

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 [email protected] 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 .

rupinder10 avatar May 10 '20 16:05 rupinder10

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

this one

asad-awadia avatar May 10 '20 16:05 asad-awadia

please propose a PR to fix it

yurishkuro avatar May 10 '20 16:05 yurishkuro