Skip to content

Instantly share code, notes, and snippets.

@nickfloyd
Last active August 29, 2015 13:56
Show Gist options
  • Save nickfloyd/8852944 to your computer and use it in GitHub Desktop.
Save nickfloyd/8852944 to your computer and use it in GitHub Desktop.
New Relic Extension xml MongoDB for the 10gen driver
<?xml version="1.0" encoding="utf-8"?>
<extension xmlns="urn:newrelic-extension">
<instrumentation>
<!-- instrument MongoDB.Driver.Collection -->
<tracerFactory metricName="Mongo">
<match assemblyName="MongoDB.Driver" className="MongoDB.Driver.Collection">
<exactMethodMatcher methodName="Count" />
<exactMethodMatcher methodName="Count" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="FindAll" />
<exactMethodMatcher methodName="FindOne" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Find" parameters="System.String" />
<exactMethodMatcher methodName="Find" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Find" parameters="MongoDB.Driver.Document,System.Int32,System.Int32" />
<exactMethodMatcher methodName="Find" parameters="MongoDB.Driver.Document,System.Int32,System.Int32,MongoDB.DriverDocument" />
<exactMethodMatcher methodName="Insert" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Delete" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Update" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Update" parameters="MongoDB.Driver.Document,MongoDB.Driver.Document" />
<exactMethodMatcher methodName="Update" parameters="MongoDB.Driver.Document,MongoDB.Driver.Document,System.Int32" />
<exactMethodMatcher methodName="Update" parameters="MongoDB.Driver.Document,MongoDB.Driver.Document,MongoDB.Driver.UpdateFlags" />
<exactMethodMatcher methodName="UpdateAll" parameters="MongoDB.Driver.Document,MongoDB.Driver.Document" />
<exactMethodMatcher methodName="MapReduce" />
<exactMethodMatcher methodName="MapReduceBuilder" />
</match>
</tracerFactory>
</instrumentation>
</extension>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment