Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master

This branch is 30 commits ahead, 2 commits behind klmitch:master

etc/ doesn't work reliably on all versions of distribute

At least on distribute 0.6.24, it can't find etc/ with the error message:

warning: no directories found matching 'etc/'

Without the trailing / all versions of distribute I tested work
latest commit 9f35936166
@jerdfelt jerdfelt authored


Example instrumentation:

For the NovaAPI, using the OpenstackAPI, created in tach-api.conf

# also accepts a full path to the file, instead of a python module path
app_helper = tach_helper

driver = tach.notifiers.StatsDNotifier
host = <Your statsd host>
port = <Your statsd port, probably 8125>

module = nova.api.openstack.wsgi.Resource
method = _process_stack
metric = tach.metrics.ExecTime
notifier = statsd
app_path = tach_helper
app = process_stack

Set up the helper script, created in

This is where things get a little messy, but that's the catch with trying to instrument something you don't want to modify directly...

# create this in a file called in the same directory as the conf
def queue_receive(*args, **kwargs):
    method = args[2]
    return args, kwargs, "nova.compute.%s" % method

def network_queue_receive(*args, **kwargs):
    method = args[2]
    return args, kwargs, "" % method

def scheduler_queue_receive(*args, **kwargs):
    method = args[2]
    return args, kwargs, "nova.scheduler.%s" % method

def process_stack(*args, **kwargs):
    resource = args[0]
    req = args[1].__dict__
    method = ".%s" % req['environ']['REQUEST_METHOD']
    path = '.%s' % req['environ']['PATH_INFO'].split('/')[2]
    action = ".%s" % req['environ']['wsgiorg.routing_args'][1]['action']
    if action:
        key = 'nova.api%s%s%s' % (path, action, method)
        key = 'nova.api%s%s%s' % (path, method)
    return args, kwargs, key

Finally, launch the above

# Assumes you're in the nova dir already
tach tach-api.conf ./bin/nova-api
tach tach-compute.conf ./bin/nova-compute
tach tach-scheduler.conf ./bin/nova-scheduler
tach tach-network.conf ./bin/nova-network
Something went wrong with that request. Please try again.