You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
Is it possible to expose the rootSpan->spanId() from OpenCensus\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 of public/index.php to create a span with the startTime backdated to when the application started.
<?phpnamespaceA1comms\GaeSupportLaravel\Trace;
useOpenCensus\Trace\Tracer;
useIlluminate\Support\ServiceProvider;
classTraceServiceProviderextendsServiceProvider
{
publicfunctionboot()
{
if ((!is_gae()) || (php_sapi_name() == 'cli')) {
return;
}
// Create a span that starts from when Laravel first boots (public/index.php)Tracer::inSpan(['name' => 'laravel/bootstrap', 'startTime' => LARAVEL_START], function () {});
}
}
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 as parentSpanId, which should fix the formatting.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: