Created
August 21, 2017 15:08
-
-
Save adam-hert/9e4a046126d781ab7f6418401c556510 to your computer and use it in GitHub Desktop.
Tracing Celery Tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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