Elasticsearch version: 7.0.1
APM Agent language and version: Python 4.2.2
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I am seeing the follow error multiple times in my logs:
RequestError(400, 'illegal_argument_exception',
'request [/my_index/_search] contains unrecognized parameters: [__elastic_apm_api_method_name], [__elastic_apm_body_ref]')
It appears that APM is adding query params to the ES search request. When I run something similar with Kibana I see the same error:
GET /my_index/search?elastic_apm
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "request [/my_index/_search] contains unrecognized parameter: [elastic_apm]"
}
],
"type": "illegal_argument_exception",
"reason": "request [/my_index/_search] contains unrecognized parameter: [elastic_apm]"
},
"status": 400
}
Can I force APM to not do this? Or, force ES to not throw because of unused params? Thanks!
Steps to reproduce:
- Configure APM Python Agent
- Have endpoint with ES query on that service
- service is using gunicorn & gevent & Flask
- Run many calls against that endpoint and some will throw the exception
Provide logs and/or server output (if relevant):