Skip to content

lxkaka/jaeger-django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

service tracing using jaeger in django project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages