Skip to content

Instantly share code, notes, and snippets.

@lawik
Last active October 6, 2015 07:32
Show Gist options
  • Save lawik/1d8c315002eeccd6c085 to your computer and use it in GitHub Desktop.
Save lawik/1d8c315002eeccd6c085 to your computer and use it in GitHub Desktop.
Grossly simplified client
from newrelic import agent as nr
class ReqRepClient(object):
def send(self, tracking_id, method, data):
transaction = nr.current_transaction()
with nr.ExternalTrace(transaction, 'reqrep', url=self.server_endpoint, method=method):
return self._send(tracking_id, method, data)
def _send(self, tracking_id, method, data):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment