stop whining if _SESSION etc are not defined
This commit is contained in:
parent
492c4eecfb
commit
3bf275e445
|
@ -54,9 +54,9 @@ class Tracer {
|
||||||
$span = $this->tracer->spanBuilder($_SESSION['name'] ?? 'not-logged-in')
|
$span = $this->tracer->spanBuilder($_SESSION['name'] ?? 'not-logged-in')
|
||||||
->setParent($context)
|
->setParent($context)
|
||||||
->setSpanKind(SpanKind::KIND_SERVER)
|
->setSpanKind(SpanKind::KIND_SERVER)
|
||||||
->setAttribute('php.request', json_encode($_REQUEST))
|
->setAttribute('php.request', json_encode($_REQUEST ?? []))
|
||||||
->setAttribute('php.server', json_encode($_SERVER))
|
->setAttribute('php.server', json_encode($_SERVER ?? []))
|
||||||
->setAttribute('php.session', json_encode($_SESSION))
|
->setAttribute('php.session', json_encode($_SESSION ?? []))
|
||||||
->startSpan();
|
->startSpan();
|
||||||
|
|
||||||
$scope = $span->activate();
|
$scope = $span->activate();
|
||||||
|
|
Loading…
Reference in New Issue