From the Blogosphere
Tracing Celery Performance for Web Applications
A few useful ways to get insight into Celery performance when running tasks.
By: Dan Kuebrich
Jun. 19, 2013 11:35 AM
Are you using Celery to process Python back-end tasks asynchronously? Have you wanted to get insight into their resource consumption and efficiency? Here’s a few useful ways to get insight into Celery performance when running tasks.
A simple celery task
Let’s trace Celery
The key part is the @oboe.Context.trace decorator. Note that we’re assigning to the keys Controller and Action. This will be used by Tracelytics to segment the data. You can also optionally use the keys HTTP-Host and URL to indicate domain and URL to Tracelytics. Here’s what the data we’re gathering looks like in the dashboard (I added a few sqlalchemy queries to spice up the data):
The code at the top is configuration tunables: set the sample rate to a fractional value to trace only a fraction of your Celery tasks.
Slightly more interesting
Photo Credit: dottiemae
Latest AJAXWorld RIA Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week