opentracing / lua-bridge-tracer

Provides an implementation of the Lua OpenTracing API on top of the C++ API
Apache License 2.0
14 stars 13 forks source link

Binary injection failed #4

Open gy1005 opened 5 years ago

gy1005 commented 5 years ago

It seemed that tracer:binary_inject() didn't inject the span context to the carrier when I replaced tracer:text_map_inject() function in the tutorial.lua with it. carrierturned out to be an empty string and span_context is nil. Any idea on that?

local carrier = tracer:binary_inject(parent_span:context())
local span_context = tracer:binary_extract(carrier)
assert(span_context ~= nil)
gy1005 commented 5 years ago

While tracer:text_map_inject() and tracer:http_headers_inject() worked perfectly for me.

rnburn commented 5 years ago

Which tracer are you using?

gy1005 commented 5 years ago

I am using Jaeger from https://github.com/jaegertracing/jaeger-client-cpp/releases/download/v0.4.2/libjaegertracing_plugin.linux_amd64.so.

And opentracing-cpp-1.5.1 built from source.