bcuff / elasticsearch-net-aws

Add-on to Elasticsearch.Net & NEST for using AWS's elasticsearch service.
Apache License 2.0
72 stars 27 forks source link

Upgrade to ElasticSearch.Net 7.0 (Alpha release) #46

Closed williamdenton closed 5 years ago

williamdenton commented 5 years ago

Apologies if I've jumped the gun a bit here, I had some free time this weekend and decided to have a crack at this on my own. https://github.com/bcuff/elasticsearch-net-aws/issues/45

Happy to discuss my approach, also fine if you would rather do this bit of fairly critical work yourself.

I'm not 100% sure how to indicate that this 7.0 build is alpha in the CI for this repo, so this shouldn't be merged if there is an automated process that will deploy this to nuget as v7.0.0 without a pre release tag.

williamdenton commented 5 years ago

My desire is to add Aws XRay support to AwsHttpConnection. It may be better implemented as a subclass like AwsHttpConnectionWithXRay as XRay will thrown runtime exceptions if not configured correctly. This isn't a huge value-add so this could just as easily be something people add in their own code base if you don't want to add it to this library.

using Amazon.XRay.Recorder.Handlers.System.Net;
...
protected override HttpMessageHandler CreateHttpClientHandler(RequestData requestData)
{
    var innerHandler = base.CreateHttpClientHandler(requestData);
    return new HttpClientXRayTracingHandler(innerHandler);
}

required csproj reference:

<PackageReference Include="AWSXRayRecorder.Handlers.System.Net" Version="2.5.*" />
williamdenton commented 5 years ago

Also noticed on old nuspec file in there that probably needs deleting? Elasticsearch.Net.Aws.nuspec

bcuff commented 5 years ago

Hey thanks for the PR. this looks good for the most part. I'll likely merge and make some package related tweaks before publishing. Since NEST is still a pre-release I'll also publish this as a pre-release.

bcuff commented 5 years ago

@williamdenton https://www.nuget.org/packages/Elasticsearch.Net.Aws/7.0.0-beta1 Let me know if there are any issues. Thanks!