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.

Files for jaeger-django, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size jaeger_django-1.0.2-py3-none-any.whl (14.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jaeger-django-1.0.2.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page