python-flask icon indicating copy to clipboard operation
python-flask copied to clipboard

Use RequestContextManager

Open iurisilvio opened this issue 6 years ago • 6 comments

Related to https://github.com/uber-common/opentracing-python-instrumentation/issues/52

I'm trying to use install_all_patches() but the instrumentation spans are not attached to the current request, because this module doesn't use RequestContextManager. I think this behaviour should be the default or at least easy to setup.

iurisilvio avatar Aug 20 '18 16:08 iurisilvio

@iurisilvio RequestContextManager is a non-standard mechanism that exists only in the library you mentioned. I have a branch, based on @carlosalberto 's work, that implements support for OT 2.0 and scope managers (https://github.com/yurishkuro/opentracing-python-instrumentation/tree/ot_scopemanager_integration)

With that branch, this project still doesn't work correctly because of #18 (but I tried to hack it to use start_active_span and it works, so hopefully it will get merged here soon).

yurishkuro avatar Aug 23 '18 07:08 yurishkuro

I understand. OpenTracing libs are still evolving, I'm looking forward to use them.

Thanks for your work!

iurisilvio avatar Aug 29 '18 16:08 iurisilvio

Same here, its (too) hard to wire up a flask app together with opentracing-python-instrumentation. As far as I understand, solving this issue will align the two libraries so that the fit together? I guess I'm looking for a way to build this demo without all the custom gunk (which shouldn't really be necessary): https://github.com/trondhindenes/Traefik-Flask-Opentracing-Blogpost

trondhindenes avatar Sep 07 '18 09:09 trondhindenes

@yurishkuro Now that https://github.com/opentracing-contrib/python-flask/issues/18 has been merged, is it possible to get your branch merged into opentracing-python-instrumentation and new releases of both projects with support for OT 2.0?

wjoel avatar Oct 15 '18 08:10 wjoel

Any update on this, @yurishkuro or @carlosalberto?

wjoel avatar Nov 13 '18 15:11 wjoel

@wjoel @yurishkuro I've released the 1.0.0 version which supports OT 2.0 ;)

Let me know.

carlosalberto avatar Nov 13 '18 16:11 carlosalberto

This package is no longer being maintained, users should migrate to the opentelemetry-api package.

Closing.

ptmcg avatar Feb 29 '24 22:02 ptmcg