In the line
$ddTraceSpan = \DDTrace\GlobalTracer::get()->getActiveSpan();
I suspect it's possible for this to come back with a null, either in the call to get() or the call to getActiveSpan(), if something hasn't worked quite as expected.
I think we should be more explicit about checking these return values before we use them, else we risk some fatal errors and processes shutting down, just because of the logging - which we want to be as invisible as possible.
In the line
I suspect it's possible for this to come back with a null, either in the call to
get()or the call togetActiveSpan(), if something hasn't worked quite as expected.I think we should be more explicit about checking these return values before we use them, else we risk some fatal errors and processes shutting down, just because of the logging - which we want to be as invisible as possible.