Closed jcchavezs closed 7 years ago
Hi @lvht thanks for the feedback.
The standard says:
A carrier, whose type is dictated by the format. The Tracer implementation will encode the SpanContext in this carrier object according to the format.
This is something that I already faced and I am ok with removing the interfaces as of format
should dictate the type here. I actually use a pretty similar design to the one you proposed in my Zipkin library: https://github.com/jcchavezs/zipkin-php/blob/master/src/Zipkin/Propagation/Setter.php
Ping @felixfbecker @beberlei @tPl0ch
Could you @jcchavezs include this issue in milestone 1.0.0
?
From @lvht in https://github.com/opentracing/opentracing-php/issues/31
Please all me to make another comment on the following API,
Both the Writer and Reader interface is needless, because it should defined in different implementations.
I think we should change them to
Maybe we could make the
inject
method return a $carrier instance.So that we can use any type to transfer the span context.
With the old API, we should
But with the API I proposed, we only
All in all, we should not restrict the type of carrier. Remember that we are using the language of PHP, a weak type, dynamic language, not Java, not Go, not Python.