Skip to main content

service tracing using jaeger in django project

Project description

jaeger-django

This python package can be used in django project to tracing service with jaeger. Enjoy!

Install

pip install jaeger-django

Usage

  • Using middleware for inbound request settings.py in django

    MIDDLEWARE = [
        'jaegertrace.middleware.TraceMiddleware',
        # other middleware
        'django.middleware.security.SecurityMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'corsheaders.middleware.CorsMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.messages.middleware.MessageMiddleware',
        'django.middleware.clickjacking.XFrameOptionsMiddleware',
    ]
    # service name
    SERVICE_NAME = 'service name'
    # other conf
    ...
    
  • Using httpclient for outbound request

    from jaegertrace.httpclient import HttpClient
    HttpClient(url='http://httpbin.org/get').get()
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaeger-django-1.0.2.tar.gz (8.2 kB view hashes)

Uploaded source

Built Distribution

jaeger_django-1.0.2-py3-none-any.whl (14.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page