NRConfig – automatic New Relic custom instrumentation file generation

Sample output from nrconfig run against mscorlib, just for funWe use New Relic at work to monitor and report on uptime, performance and errors in our Azure application. New Relic comes with a built-in profiler that can be configured to hook into methods so that hot-path traces can be shown when a page takes longer than usual to load – invaluable when diagnosing bottle-necks.

However, configuring the profiler’s a manual process – you must maintain an XML file that lists the assemblies, classes and methods to instrument. Since it’s manual, it’s not in sync with your code unless you keep it so:

  • You must remember when you change a method signature or name
  • It doesn’t keep up with refactoring events

To help, I threw NRConfig together. It lets you:

  • Generate a custom instrumentation file for an arbitrary assembly, using some simple command-line filtering
  • Generate a custom instrumentation file for assemblies you’ve marked up with a particular attribute, giving you more fine-grained control
  • Merge multiple custom instrumentation files into one

Available from:

Associated blog posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.