opentracing/specification

Wire format for MockTracer

Opened this issue · 7 comments

Currently, MockTracer impls are using different wire formats. It would be good to normalize on something.

We could use something like this:
ot-mock-<object> object=[spanid,traceid,baggage]

Why the mock-xxx should be part of specification? It is normal and popular, but just in test scenario. We should keep the specification stabilization.

I am not saying that it should be in specification. This is just an umbrella issue because it affects multiple API repositories.

😆,Good to know.

I've always viewed mock tracers as meant only for unit testing of individual instrumentations. What would be the use case for cross-language testing? I had one such use case in the past when we instrumented TChannel (which has libs in 4 languages), but we used basictracer for those tests, and such situation seems to be fairly rare.

Where to draw the line here? Trying to avoid interfering with HTTP headers? A value still could include a couple of newlines and inject other HTTP headers. Dealing with that gets you into escaping all the values.

A harness for cross-language testing could be useful. Does it make sense to embed that in the mocks that are used for local unit testing?

I think there are use cases for testing polyglot instrumentations e.g. what @yurishkuro mentioned, these are just more rare than simple framework instrumentations. One could be maybe test instrumentation of a polyglot app.

Other note, the identifier should include special characters like -, _ to verify that these commonly used delimiters can be used on the wire. It could identify issues like this: opentracing-contrib/java-jms#1