Wikia / opentracing-php

MIT License
11 stars 2 forks source link

Adjust injector/extractor API #6

Closed beberlei closed 8 years ago

beberlei commented 8 years ago

The injector/extractor API changed again in OpenTracing which needs recognition here:

interface Tracer
{
    /**
     * @param string $format
     * @param mixed $carrier
     * @throws \OpenTracing\Exception
     */
    public function inject(Span $span, $format, &$carrier);
    /**
     * @param string $format
     * @param mixed $carrier
     * @throws \OpenTracing\Exception
     * @return Span
     */
    public function join($operationName, $format, $carrier);
}

The injector/extractor interfaces can be removed.

To signify the SplitTextCarrier and SplitBinarYCarrier existance as default supported carriers, we could add a class OpenTracing\Propagation with constants:

class Propagation
{
    const SPLIT_TEXT = 'split_text';
    const SPLIT_BINARY = 'split_binary';
}
wladekb commented 8 years ago

Updated.

I still need to update the "basictracer" implementation later.