opentracing-contrib / python-django

OpenTracing instrumentation for the Django framework
BSD 3-Clause "New" or "Revised" License
105 stars 54 forks source link

Need for a lock when setting the global `Tracer` #32

Closed carlosalberto closed 5 years ago

carlosalberto commented 6 years ago

Hey @mikebryant

Currently we have a lock used when setting opentracing.Tracer (and also, indirectly, when creating a Tracer through the OPENTRACING_TRACER_CALLABLE value), and I'm wondering whether this is needed.

Before Django 1.10, the middleware is supposed to be initialized only once when the first request takes place (https://docs.djangoproject.com/en/1.9/topics/http/middleware/#init)

As of Django 1.10, the middleware will be initialized only once at server start (https://docs.djangoproject.com/en/1.10/topics/http/middleware/#init-get-response)

Is there any advanced need to take a lock? I remember you mentioning forking, but I have forgotten the details now ;)

carlosalberto commented 6 years ago

Hey @mikebryant

Any news on this? ;)

carlosalberto commented 6 years ago

Due to lack of answer, I will proceed to remove this lock - I haven't seen any need for this one (from the very Django perspective).

mikebryant commented 6 years ago

Sorry, I've been dropping the ball here. Please go ahead.

carlosalberto commented 6 years ago

Thanks Mike!

naphthalene commented 6 years ago

Can we get a release with this change published please?

carlosalberto commented 6 years ago

@naphthalene I'd say in 1 week - would like to verify the other framework instrumentations are in proper shape before we release it.

carlosalberto commented 5 years ago

Closing as this has been solved for long time ;)