opentracing / opentracing-php

OpenTracing API for PHP
Apache License 2.0
505 stars 56 forks source link

undefined method OpenTracing\SpanContext::createAsDefault() #17

Closed jukylin closed 7 years ago

jukylin commented 7 years ago

Hey ! I found has not method "createAsDefault",in src\OpenTracing\NoopTracer.php #34.

public function extract($format, Reader $carrier)
{
    return SpanContext::createAsDefault();
 }

It's

public function extract($format, Reader $carrier)
{
    return NoopSpanContext::create() ;
}

right ?

jcchavezs commented 7 years ago

Nice catch @jukylin! I just fixed it. This might never happen with tests but I am not sure if it is worth to test noop implementations for now.

jukylin commented 7 years ago

I creating jaeger-php and use noopTrace. so I foud that.