Skip to content

Commit ca54234

Browse files
committed
Manually set service name until #7 is fixed
1 parent 19e5fe2 commit ca54234

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

instana/django.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
from __future__ import print_function
22
import opentracing as ot
3-
from instana import tracer
3+
from instana import tracer, options
44
import opentracing.ext.tags as ext
55

6+
67
DJ_INSTANA_MIDDLEWARE = 'instana.django.InstanaMiddleware'
78

89

910
class InstanaMiddleware(object):
1011
""" Django Middleware to provide request tracing for Instana """
1112
def __init__(self, get_response):
1213
self.get_response = get_response
13-
ot.global_tracer = tracer.InstanaTracer()
14+
opts = options.Options(service="Django")
15+
ot.global_tracer = tracer.InstanaTracer(opts)
1416
self
1517

1618
def __call__(self, request):

0 commit comments

Comments
 (0)