Skip to content

Fix for json-incompatible elasticsearch bodies #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 6, 2021

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Jan 5, 2021

What does this pull request do?

Uses the Elasticsearch serializer for better compatibility

Related issues

Closes #997

@apmmachine
Copy link
Contributor

apmmachine commented Jan 5, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #998 updated

  • Start Time: 2021-01-06T22:40:09.649+0000

  • Duration: 23 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 11563
Skipped 8356
Total 19919

Steps errors 1

Expand to view the steps failures

Shell Script
  • Took 2 min 32 sec . View more details on here
  • Description: ./tests/scripts/docker/run_tests.sh python-2.7 none

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 11563
Skipped 8356
Total 19919

@basepi basepi force-pushed the 997es_body branch 3 times, most recently from 8aa8c7b to 082c4d6 Compare January 5, 2021 16:54
@beniwohli
Copy link
Contributor

@basepi AFAICT, the serialized body is an argument to Connection.perform_request() already:

https://github.com/elastic/elasticsearch-py/blob/4441da0cbc4ecd02c81b93830b1318647b4018f9/elasticsearch/connection/base.py#L236-L245

So there shouldn't be a need for us to serialize it again and passing it around in the params "back channel"

@basepi basepi merged commit 9be21a8 into elastic:master Jan 6, 2021
beniwohli pushed a commit to beniwohli/apm-agent-python that referenced this pull request Sep 14, 2021
* Use the elasticsearch serializer for better compat

* Use the `body` provided with perform_request

* Check for bytes body

* CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5.10.0 "kind of" regression for elasticsearch instrumentation due to logging of whole body
3 participants