Use Oslo's unified request identifier (correlation_id)
Make use of the global correlation_id in glance for effective debugging of requests that span across services. The detailed discussion on the same feature in nova is available at: https:/
As part of this story we propose to implement the following:
1. Modify the pipeline(in api-paste.ini) to obtain/generate correlation_id using the correlation_id middleware as the first step.
2. Correlation_id middleware does the following:
a) Uses the correlation_id if available from the API request header.
b) Generates a new correlation_id and includes it as part of the request header for requests originating at glance.
3. Add the correlation_id obtained/generated into the glance's RequestContext as kwargs.
4. Modify common logging code to be capable of logging the correlation_id
PS: The correlation_id middleware is available at oslo-incubator
Blueprint information
- Status:
- Complete
- Approver:
- John Bresnahan
- Priority:
- Undefined
- Drafter:
- Venkatesh Sampath
- Direction:
- Needs approval
- Assignee:
- Venkatesh Sampath
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Venkatesh Sampath
Related branches
Related bugs
Sprints
Whiteboard
<jbresnah>
I am happy to see this, it looks like a well needed feature. I have 1 thought WRT tast #4 (4. Modify common logging code to be capable of logging the correlation_id). Can this identifier be put into thread specific storage and logged via a logging adapter? A similar thing was done here: https:/
</jbresnah>
<amalabasha>
Hi John.....
As you've suggested we've decided on adding the correlation_id to the thread specific storage. but looks like python's weak store doesn't reference string objects. SO just wondering if it is OK to add it to the strong store?
<amalabasha>
The blueprint is supersed by the following blueprint and its implementation:
https:/