File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,19 @@ final class Client implements ClientInterface
31
31
const VERSION = '8.15.0 ' ;
32
32
const API_COMPATIBILITY_HEADER = '%s/vnd.elasticsearch+%s; compatible-with=8 ' ;
33
33
34
+ const SEARCH_ENDPOINTS = [
35
+ 'search ' ,
36
+ 'async_search.submit ' ,
37
+ 'msearch ' ,
38
+ 'eql.search ' ,
39
+ 'terms_enum ' ,
40
+ 'search_template ' ,
41
+ 'msearch_template ' ,
42
+ 'render_search_template ' ,
43
+ 'esql.query ' ,
44
+ 'knnSearch '
45
+ ];
46
+
34
47
use ClientEndpointsTrait;
35
48
use EndpointTrait;
36
49
use NamespaceTrait;
Original file line number Diff line number Diff line change 31
31
32
32
trait EndpointTrait
33
33
{
34
- const SEARCH_ENDPOINTS = [
35
- 'search ' ,
36
- 'async_search.submit ' ,
37
- 'msearch ' ,
38
- 'eql.search ' ,
39
- 'terms_enum ' ,
40
- 'search_template ' ,
41
- 'msearch_template ' ,
42
- 'render_search_template ' ,
43
- 'esql.query ' ,
44
- 'knnSearch '
45
- ];
46
-
47
34
/**
48
35
* Check if an array containts nested array
49
36
*/
@@ -230,7 +217,7 @@ protected function addOtelAttributes(
230
217
$ otel ["db.elasticsearch.path_parts. $ part " ] = $ params [$ part ];
231
218
}
232
219
}
233
- if (in_array ($ endpoint , self ::SEARCH_ENDPOINTS )) {
220
+ if (in_array ($ endpoint , Client ::SEARCH_ENDPOINTS )) {
234
221
$ body = $ request ->getBody ()->getContents ();
235
222
if (!empty ($ body )) {
236
223
$ otel ['db.query.text ' ] = OpenTelemetry::redactBody ($ body );
You can’t perform that action at this time.
0 commit comments