final protected function getContext() : array
    {
        $context = [
            'request' => empty($this->contexts['request']) ? $this->generateRequest() : $this->contexts['request']
        ];

        // Add User Context
        if (empty($this->contexts['user']) === false) {
            $context['user'] = $this->contexts['user'];
        }

        // Add Custom Context
        if (empty($this->contexts['custom']) === false) {
            $context['custom'] = $this->contexts['custom'];
        }

        // Add Tags Context
        if (empty($this->contexts['tags']) === false) {
            $context['tags'] = $this->contexts['tags'];
        }

        return $context;
    }
final protected function getContext() : array
    {
        $context = [
            'request' => empty($this->contexts['request']) ? $this->generateRequest() : $this->contexts['request']
        ];

        // Add User Context
        if (empty($this->contexts['user']) === false) {
            $context['user'] = $this->contexts['user'];
        }

        // Add Custom Context
        if (empty($this->contexts['custom']) === false) {
            $context['custom'] = $this->contexts['custom'];
        }

        // Add Tags Context
        if (empty($this->contexts['tags']) === false) {
            $context['tags'] = $this->contexts['tags'];
        }

        return $context;
    }
final protected function getContext ( ) : array { $ context = [ 'request' => empty ( $ this -> contexts [ 'request' ] ) ? $ this -> generateRequest ( ) : $ this -> contexts [ 'request' ] ] ; // Add User Context if ( empty ( $ this -> contexts [ 'user' ] ) === false ) { $ context [ 'user' ] = $ this -> contexts [ 'user' ] ; } // Add Custom Context if ( empty ( $ this -> contexts [ 'custom' ] ) === false ) { $ context [ 'custom' ] = $ this -> contexts [ 'custom' ] ; } // Add Tags Context if ( empty ( $ this -> contexts [ 'tags' ] ) === false ) { $ context [ 'tags' ] = $ this -> contexts [ 'tags' ] ; } return $ context ; }
Get the Events Context

@link https://www.elastic.co/guide/en/apm/server/current/transaction-api.html#transaction-context-schema

@return array
Get the Events Context