Skip to content

ElasticSearchIntegration - performRequest does not exist on class #191

@LavaToaster

Description

@LavaToaster

When I enabled the DD APM I got the following error message

┌─[root@server] - [/opt/app/qa/api] - [2018-12-17 12:59:26]
└─[0] <> php artisan

In ElasticSearchIntegration.php line 160:

  [InvalidArgumentException]
  failed to set return for Elasticsearch\Endpoints\AbstractEndpoint::performRequest, the method does not exist


Exception trace:
 () at /opt/app/qa/api/vendor/datadog/dd-trace/src/DDTrace/Integrations/ElasticSearch/V1/ElasticSearchIntegration.php:160
 dd_trace() at /opt/app/qa/api/vendor/datadog/dd-trace/src/DDTrace/Integrations/ElasticSearch/V1/ElasticSearchIntegration.php:160
 DDTrace\Integrations\ElasticSearch\V1\ElasticSearchIntegration::load() at n/a:n/a
 call_user_func() at /opt/app/qa/api/vendor/datadog/dd-trace/src/DDTrace/Integrations/IntegrationsLoader.php:54
 DDTrace\Integrations\IntegrationsLoader::load() at /opt/app/qa/api/vendor/datadog/dd-trace/src/DDTrace/Integrations/Laravel/V5/LaravelProvider.php:172
 DDTrace\Integrations\Laravel\V5\LaravelProvider->boot() at n/a:n/a
 call_user_func_array() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Container/Container.php:572
 Illuminate\Container\Container->call() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:795
 Illuminate\Foundation\Application->bootProvider() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:778
 Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() at n/a:n/a
 array_walk() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:779
 Illuminate\Foundation\Application->boot() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17
 Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:204
 Illuminate\Foundation\Application->bootstrapWith() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:297
 Illuminate\Foundation\Console\Kernel->bootstrap() at /opt/app/qa/api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:120
 Illuminate\Foundation\Console\Kernel->handle() at /opt/app/qa/api/artisan:43

From my own debugging I can see that we rely on 5.3.* of the elasticsearch/elasticsearch package, however, the composer.json file in here suggests that you rely on the 1.2.* version. (over 4 years old)

It appears that the method you want to hook into doesn't exist in later version of the package. I'm not entirely sure, otherwise I'd send in a PR, but I feel like you're looking for this method https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/Transport.php#L93.

If possible as well can you put instrumentation setup through try/catches and disable those that fail, possibly with an error somewhere?

I've had to disable the elastic search integration provider due to issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions