Open iamacarpet opened 6 years ago
Looking around at this a little more, I wanted to check that even if the parentSpanId is passed through, it would be applied.
Does this imply that it won't be?
As if there is a parent as detected internally by the extension, it'll always prefer that to anything in the span options?
I saw in some code comments that setting "parentSpanId" to null in the span options would make it default to the rootSpan->spanId(), but this didn't work either :(.
Is it possible to expose the
rootSpan->spanId()
fromOpenCensus\Trace\RequestHandler
?Currently it is private
private $rootSpan;
and I can't see any methods that expose it.I'm adding tracing for Laravel to our shared library, to run on App Engine Standard (PHP 7.2).
The examples provided creates a service provider which uses the
LARAVEL_START
constant set at the top ofpublic/index.php
to create a span with thestartTime
backdated to when the application started.At the moment, this is firing after some other trace events have already taken place, so the tree looks a little bit weird (see screenshow below).
I'd ideally like to be able to pass
rootSpan->spanId()
into that spans options asparentSpanId
, which should fix the formatting.