opentracing / opentracing-php

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

Fixes references on span options. #15

Closed jcchavezs closed 7 years ago

jcchavezs commented 7 years ago

This PR removes all the privileged references to child_of and follows_from reference types. In addition, it renames SpanReference into Reference as of the standard does not mention the term span reference and the it is a shorter name that is convinient:

// before
$reference = SpanReference::create(SpanReference::CHILD_OF, $context);
// after
$reference = Reference::create(Reference::CHILD_OF, $context);

Finally it also adds the InvalidReferencesSet exception which is meant to be used for when the instrumentor provides more than one parent reference (e.g. two child_of or two follows_from or etc).

Ping @felixfbecker @beberlei @yurishkuro