<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 New Relic Corporation. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
<extension xmlns="urn:newrelic-extension">
	<instrumentation>
    <!--7.x NEST/Elasticsearch.Net -->
    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elasticsearch.Net" className="Elasticsearch.Net.Transport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="Request" parameters="Elasticsearch.Net.HttpMethod,System.String,Elasticsearch.Net.PostData,Elasticsearch.Net.IRequestParameters" />
      </match>
    </tracerFactory>

    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elasticsearch.Net" className="Elasticsearch.Net.Transport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="RequestAsync" parameters="Elasticsearch.Net.HttpMethod,System.String,System.Threading.CancellationToken,Elasticsearch.Net.PostData,Elasticsearch.Net.IRequestParameters" />
      </match>
    </tracerFactory>

    <!--8.x Elastic.Clients.Elasticsearch -->
    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DefaultHttpTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="Request" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters" />
      </match>
    </tracerFactory>

    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DefaultHttpTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="RequestAsync" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters,System.Threading.CancellationToken" />
      </match>
    </tracerFactory>

    <!--8.10.0+-->
    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DefaultHttpTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="Request" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters,Elastic.Transport.Diagnostics.OpenTelemetryData&amp;" />
      </match>
    </tracerFactory>

    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DefaultHttpTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="RequestAsync" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters,Elastic.Transport.Diagnostics.OpenTelemetryData&amp;,System.Threading.CancellationToken" />
      </match>
    </tracerFactory>

    <!--8.12.1+-->
    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DistributedTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="Request" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters,Elastic.Transport.Diagnostics.OpenTelemetryData&amp;" />
      </match>
    </tracerFactory>

    <tracerFactory name="ElasticsearchRequestWrapper">
      <match assemblyName="Elastic.Transport" className="Elastic.Transport.DistributedTransport`1" maxVersion="8.15.10">
        <exactMethodMatcher methodName="RequestAsync" parameters="Elastic.Transport.HttpMethod,System.String,Elastic.Transport.PostData,Elastic.Transport.RequestParameters,Elastic.Transport.Diagnostics.OpenTelemetryData&amp;,System.Threading.CancellationToken" />
      </match>
    </tracerFactory>

  </instrumentation>
</extension>
