Metadata-Version: 2.1
Name: Celery-OpenTracing
Version: 0.0.1rc1
Summary: OpenTracing support for Celery
Home-page: http://github.com/signalfx/python-celery
Author: SignalFx, Inc.
Author-email: info@signalfx.com
License: Apache Software License v2
Download-URL: http://github.com/signalfx/python-celery/tarball/master
Description: # Celery OpenTracing
        
        This package enables tracing task execution in a [Celery 3.1+](http://www.celeryproject.org/) application via [The OpenTracing Project](http://opentracing.io). Once a production system contends with real concurrency or splits into many services, crucial (and formerly easy) tasks become difficult: user-facing latency optimization, root-cause analysis of backend errors, communication about distinct pieces of a now-distributed system, etc. Distributed tracing follows a request on its journey from inception to completion from mobile/browser all the way to the microservices.
        
        As core services and libraries adopt OpenTracing, the application builder is no longer burdened with the task of adding basic tracing instrumentation to their own code. In this way, developers can build their applications with the tools they prefer and benefit from built-in tracing instrumentation. OpenTracing implementations exist for major distributed tracing systems and can be bound or swapped with a one-line configuration change.
        
        If you want to learn more about the underlying Python API, visit the Python [source code](https://github.com/signalfx/python-celery/).
        
        ## Installation
        
        Run the following command:
        
        ```
        $ pip install celery-opentracing
        ```
        
        ## Usage
        
        The provided `celery.app.base.Celery` subclass allows the tracing of task scheduling and execution using the OpenTracing API. All that it requires is for a `CeleryTracing` instance to be initialized using an instance of an OpenTracing tracer and treated as a standard `Celery` application.
        
        ### Initialize
        
        `CeleryTracing` takes the `Tracer` instance that is supported by OpenTracing and an optional dictionary of desired tags for each created span. You can also specify whether you'd like the initial task publish events to be represented by a span whose trace context is propagated via request headers to the worker executing the task (enabled by default).  To create a `CeleryTracing` object, you can either pass in a tracer object directly or default to the `opentracing.tracer` global tracer that's set elsewhere in your application:
        
        ```python
        from celery_opentracing import CeleryTracing
        
        opentracing_tracer = # some OpenTracing tracer implementation
        traced_app = CeleryTracing(tracer=opentracing_tracer, propagate=True,  # propagation allows distributed over broker
                                   span_tags=dict(my_helpful='tag'))           # two distributed workers.
        
        @traced_app.task(bind=True)
        def my_task(self):
            return True
        ```
        
        or
        
        ```python
        from celery_opentracing import CeleryTracing
        import opentracing
        
        opentracing.tracer = # some OpenTracing tracer implementation
        traced_app = CeleryTracing(propagate=False)  # Tracer defaults to opentracing.tracer.  No publish span creation or propagation to worker execution context will configured as well.
        
        @traced_app.task(bind=True)
        def my_task(self):
            return True
        ```
        
        ## Further Information
        
        If you're interested in learning more about the OpenTracing standard, please visit [opentracing.io](http://opentracing.io/).  If you would like to implement OpenTracing in your project and need help, feel free to send us a note at [community@opentracing.io](community@opentracing.io).
        
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Provides-Extra: integration_tests
Provides-Extra: unit_tests
