Skip to content

Instantly share code, notes, and snippets.

@dkuebric
Created May 4, 2012 00:26
Show Gist options
  • Save dkuebric/2590667 to your computer and use it in GitHub Desktop.
Save dkuebric/2590667 to your computer and use it in GitHub Desktop.
python worker tracing example
import oboe
from oboeware import loader
# load monkey-patched instrumentation for supported modules
loader.load_inst_modules()
# trace every unit of work done by decorated method
# (use fractional sample rate to trace a fraction of calls to decorated method)
oboe.config['tracing_mode'] = 'always'
oboe.config['sample_rate'] = 1.0
@oboe.Context.trace('my_worker')
def do_something():
... whatever you are tracing ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment