public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load grpc integrations.', E_USER_WARNING);
            return;
        }

        // protected function _simpleRequest($method, $argument, $deserialize, array $metadata = [],
        //                                   array $options = [])
        opencensus_trace_method(BaseStub::class, '_simpleRequest', function ($stub, $method) {
            return [
                'name' => 'grpc/simpleRequest',
                'attributes' => [
                    'host' => $stub->getTarget(),
                    'uri' => $method
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // protected function _clientStreamRequest($method, $argument, $deserialize, array $metadata = [],
        //                                         array $options = [])
        opencensus_trace_method(BaseStub::class, '_clientStreamRequest', function ($stub, $method) {
            return [
                'name' => 'grpc/clientStreamRequest',
                'attributes' => [
                    'host' => $stub->getTarget(),
                    'uri' => $method
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // protected function _serverStreamRequest($method, $argument, $deserialize, array $metadata = [],
        //                                         array $options = [])
        opencensus_trace_method(BaseStub::class, '_serverStreamRequest', function ($stub, $method) {
            return [
                'name' => 'grpc/serverStreamRequest',
                'attributes' => [
                    'host' => $stub->getTarget(),
                    'uri' => $method
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // protected function _bidiRequest($method, $deserialize, array $metadata = [], array $options = [])
        opencensus_trace_method(BaseStub::class, '_bidiRequest', function ($stub, $method) {
            return [
                'name' => 'grpc/bidiRequest',
                'attributes' => [
                    'host' => $stub->getTarget(),
                    'uri' => $method
                ],
                'kind' => Span::KIND_CLIENT
            ];
        });
    }