Skip to content

Instantly share code, notes, and snippets.

@GrahamDumpleton
Created August 10, 2012 00:24
Show Gist options
  • Save GrahamDumpleton/3309485 to your computer and use it in GitHub Desktop.
Save GrahamDumpleton/3309485 to your computer and use it in GitHub Desktop.
Name transaction using in_function.
def _name_transaction(self, f, *args):
transaction = newrelic.api.transaction.current_transaction()
if transaction:
name = newrelic.api.object_wrapper.callable_name(f)
transaction.name_transaction(name)
newrelic.api.in_function.wrap_in_function(module, 'application._delegate',
_name_transaction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment