Skip to content

Instantly share code, notes, and snippets.

@adam-hert
Created August 21, 2017 15:08
Show Gist options
  • Save adam-hert/9e4a046126d781ab7f6418401c556510 to your computer and use it in GitHub Desktop.
Save adam-hert/9e4a046126d781ab7f6418401c556510 to your computer and use it in GitHub Desktop.
Tracing Celery Tasks
from celery.task import task
import oboe
from oboeware import loader
# load monkey-patched instrumentation for supported modules
loader.load_inst_modules()
# start traces on decorated method (sampling automatically
# controlled by smart tracing as normal web requests)
oboe.config['tracing_mode'] = 'always'
@task
@oboe.trace('celery', kvs={'Controller': 'task', 'Action': 'add'})
def add(x, y):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment