<?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>
    <!-- Consume Pull -->
		<tracerFactory name="BasicGetWrapper">
			<match assemblyName="RabbitMQ.Client" className="RabbitMQ.Client.Framing.Impl.Model" maxVersion="6.8.1">
				<exactMethodMatcher methodName="_Private_BasicGet" />
			</match>
		</tracerFactory>

    <!-- Produce -->
		<tracerFactory name="BasicPublishWrapper">
			<match assemblyName="RabbitMQ.Client" className="RabbitMQ.Client.Framing.Impl.Model" maxVersion="6.8.1">
				<exactMethodMatcher methodName="_Private_BasicPublish" parameters="System.String,System.String,System.Boolean,RabbitMQ.Client.IBasicProperties,System.Byte[]"/>
				<exactMethodMatcher methodName="_Private_BasicPublish" parameters="System.String,System.String,System.Boolean,RabbitMQ.Client.IBasicProperties,System.ReadOnlyMemory`1[System.Byte]"/>
			</match>
		</tracerFactory>

    <!-- Produce -->
		<tracerFactory name="BasicPublishWrapperLegacy">
			<match assemblyName="RabbitMQ.Client" className="RabbitMQ.Client.Framing.Impl.Model" maxVersion="6.8.1">
				<exactMethodMatcher methodName="_Private_BasicPublish" parameters="System.String,System.String,System.Boolean,System.Boolean,RabbitMQ.Client.IBasicProperties,System.Byte[]"/>
			</match>
		</tracerFactory>

    <!-- Consume  Push / Event / Subscribe -->
		<tracerFactory name="HandleBasicDeliverWrapper">
      <match assemblyName="RabbitMQ.Client" className="RabbitMQ.Client.Events.EventingBasicConsumer" maxVersion="6.8.1">
        <exactMethodMatcher methodName="HandleBasicDeliver" />
      </match>
		</tracerFactory>
		
		<tracerFactory name="QueuePurgeWrapper">
			<match assemblyName="RabbitMQ.Client" className="RabbitMQ.Client.Framing.Impl.Model" maxVersion="6.8.1">
				<exactMethodMatcher methodName="_Private_QueuePurge" />
			</match>
		</tracerFactory>

	</instrumentation>
</extension>
