Open viperfx opened 6 years ago
I could not confirm this because I'm using python3 only but this could work in settings.py
for localhost
:
def initialize_tracer():
config = Config(
config={
'sampler': {'type': 'const', 'param': 1}
},
service_name='hello-world')
return config.initialize_tracer()
OPENTRACING_TRACE_ALL = True
OPENTRACING_TRACED_ATTRIBUTES = ['META']
OPENTRACING_TRACER = django_opentracing.DjangoTracer(initialize_tracer())
First, setup the all in one jaeger docker container. Then update your settings to look like this. The key is adding django_opentracing.OpenTracingMiddleware
to MIDDLEWARE_CLASSES
and the OPENTRACING_*
settings.
Confirmed working.
I think adding separate example using Jaeger to mirror flask examples would be beneficial.
I think adding separate example using Jaeger to mirror flask examples would be beneficial.
Yes, think this should be more helpful.
First, setup the all in one jaeger docker container. Then update your settings to look like this. The key is adding
django_opentracing.OpenTracingMiddleware
toMIDDLEWARE_CLASSES
and theOPENTRACING_*
settings.Confirmed working.
Hi guys, the latest version of django_opentracing requires version of opentracing >= 2.0, while the latest version of jaeger-client-python requires version of opentracing < 2,
How should make them work together?
I know django_opentracing version 0.1.20 works with opentracing version < 2.0, but there are some obvious features which are absent comparing with the latest version.
Hi guys, the latest version of django_opentracing requires version of opentracing >= 2.0, while the latest version of jaeger-client-python requires version of opentracing < 2
dependency issue was apparently fixed in 1.1.0 https://github.com/opentracing-contrib/python-django/commit/ef50385946010c7639d225f2d59e76f8376178a0
First, setup the all in one jaeger docker container. Then update your settings to look like this. The key is adding
django_opentracing.OpenTracingMiddleware
toMIDDLEWARE_CLASSES
and theOPENTRACING_*
settings.Confirmed working.
How about OPENTRACING_TRACING
setting?
I wan't to do
views.py
from django.conf import settings
tracing = settings.OPENTRACING_TRACING
@tracing.trace(optional_args)
def some_view_func(request):
... # do some stuff
from docs:
# some_opentracing_tracer can be any valid OpenTracing tracer implementation
OPENTRACING_TRACING = django_opentracing.DjangoTracing(some_opentracing_tracer)
sorry for partial repost of https://github.com/opentracing-contrib/python-django/issues/56
How do I configure a trace and connect it to a local docker container let's say, exposed at localhost.
How would I change settings.py to connect to the default Jaeger docker image?