Closed radiopapus closed 4 years ago
I research opentracing-php api and want to implement my client to get better understanding. I started from Tracer. As I understood Scope is just a wrapper for Span.
There are two methods in Tracer:
As you can see methods have a similar name but return different types.
Why methods return different types? What if startActiveSpan will return Span?
I can prepare PR for that.
This is actually the way they are meant to be. Starting an active span means that it is inside a scope and we need to be able to access the scope.
Background
I research opentracing-php api and want to implement my client to get better understanding. I started from Tracer. As I understood Scope is just a wrapper for Span.
Problem
There are two methods in Tracer:
As you can see methods have a similar name but return different types.
Questions to address
Why methods return different types? What if startActiveSpan will return Span?
Proposal
I can prepare PR for that.