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

contrib/olivere/elastic: support v7

Open AaronSteele-isp opened this issue 5 years ago • 7 comments

olivere/elastic has a newer client (v7) than is currently supported. This newer client is required to interface with ElasticSearch v7. It has changed its import path to github.com/olivere/elastic/v7.

AaronSteele-isp avatar Mar 24 '20 15:03 AaronSteele-isp

Have you tried using the existing integration with the new v7 version of the library? The SetHttpClient method still exists: https://github.com/olivere/elastic/blob/v7.0.12/client.go#L476

We don't have tests for v7 currently, but I don't see why we can't add some.

knusbaum avatar Mar 25 '20 00:03 knusbaum

Looking at their README it looks to me like they are using the new Go modules type path for this. However I can't see it defined as a an import path checking comment anywhere in the code base.

We should be able to fully support this once we switch to modules (ref #471). We're planning to do this soon.

gbbr avatar Mar 25 '20 08:03 gbbr

#672 has been merged, so we should be able to do this work now, if there is still interest. Please see also https://github.com/DataDog/dd-trace-go/issues/471#issuecomment-639361104

gbbr avatar Jun 05 '20 08:06 gbbr

Hi, any update on v7 support?

Mangosteen-Yang avatar Jul 26 '21 00:07 Mangosteen-Yang

@Mangosteen-Yang None yet, but we're happy to have help if anyone is interested in doing this.

knusbaum avatar Aug 04 '21 17:08 knusbaum

@knusbaum Within the go.mod dependencies I noticed that elastic version 3 and 5 are referenced and also within the unit tests within contrib/olivere/elastic/example_test.go though config.yml also references elasticsearch:2 and elasticsearch:5. With regards to elasticsearch specifically what are we testing through config.yml?

AHHussain569 avatar Aug 29 '21 20:08 AHHussain569

@AHHussain569 The .circleci/config.yml sets up elasticsearch:2 and elasticsearch:5 to listen on port 9200 and 9201 respectively, and are then used for integration tests such as here (v5) and here (v3)

These ports are expected and hard-coded into the tests which may not be ideal.

knusbaum avatar Aug 30 '21 17:08 knusbaum