Create a unified request identifier

Registered by Denis M. on 2014-02-06

Create a unified request identifier associated with an API request that crosses OpenStack service boundaries. This will enable more effective debugging of requests that span multiple services. For example, a Nova instance create request may touch other services including Glance and Quantum. A single id will simplify the process of tracking down errors.

See related email discussion: https://lists.launchpad.net/openstack/msg13082.html

Proposal:
-The first OpenStack service to touch a request will tag it with an "OpenStack request id". This will effectively be a global identifier. Inter-service requests will contain this ID in an HTTP header, "x-openstack-request-id". This value will be a UUID.

-Each service that touches the request will carry along this header value and use it in log messages and external notifications.

-Each service may have its own internal request identifier (request_id in Nova and Glance) and should also log this value in conjunction with the global identifier.

1. There shouldn't be a cross-service request ID, but instead a mapping of the request IDs from the calling service to the answering service.

2. The log message containing the mapping will be in the n-api log.

3. The x-openstack-request-id header will be used across projects; for nova (and cinder), x-compute-request-id will be deprecated in the future.

4. Since nova will be the one logging the mapping, the clients will need to provide the x-openstack-request-id value back with its response.

5. Since this will be rolled-out across services, common components should be shared in oslo.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Denis M.
Direction:
Needs approval
Assignee:
None
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Can you look at the common components in oslo, and propose a bp as to how this would be implemented?

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.