dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

feat(elasticsearch): support elasticsearch 8

Open joaonsantos opened this issue 3 years ago • 2 comments

Description

This change is required because newer versions of elasticsearch have the Transport class in a different location.

Fixes https://github.com/DataDog/dd-trace-py/issues/3482

Checklist

Motivation

Since newer versions of elasticsearch contain the Transport class on elastic_transport._transport, the patching mechanism needs to use this new location instead of the older versions location.

Design

This change is backwards compatible and I don't see a major drawback.

Testing strategy

The riot testing suite has been expanded with new versions of elasticsearch.

Reviewer Checklist

  • [ ] Title is accurate.
  • [ ] Description motivates each change.
  • [ ] No unnecessary changes were introduced in this PR.
  • [ ] PR cannot be broken up into smaller PRs.
  • [ ] Avoid breaking API changes unless absolutely necessary.
  • [ ] Tests provided or description of manual testing performed is included in the code or PR.
  • [ ] Release note has been added for fixes and features, or else changelog/no-changelog label added.
  • [ ] All relevant GitHub issues are correctly linked.
  • [ ] Backports are identified and tagged with Mergifyio.
  • [ ] Add to milestone.

joaonsantos avatar Aug 25 '22 17:08 joaonsantos

It also looks like the arguments for Elasticsearch() class have changed?

https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/20755/workflows/172ff6c2-fa41-4d2c-bd01-d6845817c353/jobs/1407429

brettlangdon avatar Aug 25 '22 18:08 brettlangdon

It also looks like the arguments for Elasticsearch() class have changed?

https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/20755/workflows/172ff6c2-fa41-4d2c-bd01-d6845817c353/jobs/1407429

A lot of things seem to have changed in elasticsearch 8. Unfortunately I had to make a lot of code on the tests check the elasticsearch version.

I have noticed that circle CI tests are failing on the elasticsearch 8 code path , but they are working correctly for me if I use an elasticsearch 8 instance running on port 9200. It seems to be an environment issue on your end.

I also don't understand why circle CI build docs is failing, where are the spelling errors?

If anyone could help me to finish this and get this shipped, it would be much appreciated.

joaonsantos avatar Aug 28 '22 17:08 joaonsantos

Given the low activity and conflicts I am going to close this PR.

elasticsearch8 is something we want to support, but we do not have the bandwidth to update this PR at this time.

Please feel free to resolve the conflicts and re-open the PR!

brettlangdon avatar Mar 28 '23 23:03 brettlangdon