<?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>
    <tracerFactory name="SerilogDispatchWrapper">
      <!-- For Serilog 1.x -->
      <match assemblyName="Serilog" className="Serilog.Core.Pipeline.Logger">
        <exactMethodMatcher methodName="Dispatch" />
      </match>

      <!-- For Serilog 2.x and above -->
      <match assemblyName="Serilog" className="Serilog.Core.Logger">
        <exactMethodMatcher methodName="Dispatch" />
      </match>
    </tracerFactory>
    
    <tracerFactory name="SerilogCreateLoggerWrapper">
      <match assemblyName="Serilog" className="Serilog.LoggerConfiguration">
        <exactMethodMatcher methodName="CreateLogger" />
      </match>
    </tracerFactory>
  </instrumentation>
</extension>
