[openstack-dev] Using thread local storage for correlation_id

Brian Lamar brian.lamar at rackspace.com
Tue Jun 4 18:39:41 UTC 2013


I'm going to refrain on commenting on thread local storage, but I have one question: Is this going to replace the request_id concept we've had in Nova/Glance for a while? I've been out of development for a bit but this seems like it's a similar concept. I'm all for having IDs to track across all projects.

Brian


On Jun 4, 2013, at 1:24 PM, Venkatesh Sampath <venkatesh.sampath at outlook.com<mailto:venkatesh.sampath at outlook.com>>
 wrote:

Hi Everyone,

We are planning to introduce a correlation_id across for effective debugging of requests that span across services.

The idea is to pass the correlation_id as part of the request header across services. The job of generating/capturing the correlation_id and setting it as part of the request header is done through the correlation_id.py middleware available through oslo incubator.

The services that uses the correlation_id middleware can in turn obtain the correlation_id from the request header and use it as part of logging & notification purposes.

We are planning to make the correlation_id available for logging through thread local storage especially using the existing 'local.strong_store' reference. ( available from oslo-incubator/openstack/common/local.py).
ie., by setting the correlation_id as attribute to 'local.strong_store' in the correlation_id middleware.

Wish to know if its good idea to use the thread local storage from local.py for correlation_id so that it could be used by respective services.

Thoughts?

Regards,
Venkatesh




_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130604/97ce3f00/attachment.html>


More information about the OpenStack-dev mailing list