opentracing / opentracing-php

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

Add SpanOptions::getParent #48

Open jcchavezs opened 6 years ago

jcchavezs commented 6 years ago

Background

Most of the tracer implementations only support child_of reference type.

Problem

When implementing the startSpan method we need to iterate over all references in order to find the child_of reference.

Proposal

Having a SpanOptions::getParent encapsulating this method would be very useful.

Ping @tedsuo @felixfbecker @beberlei @lvht @yurishkuro

yurishkuro commented 6 years ago

can it be a private helper method instead? Making it part of SpanOptions extends the API surface.