
'x-openstack-request-id' is the common header name for request ID which is implemented in most of the OpenStack services. Using the oslo middleware `request_id` middleware is a convenient way to generate request ID and also include it in the response. The request ID will be generated by the oslo middleware and is inserted into the request environment. On the response end, the middleware is again used, this time to attach the 'x-openstack-request-id' header, using the value of the generated request ID. Sample log output of blazar-api service for ``GET v1/os-hosts`` API which logs local request ID `req-de45521c-2a04-4e7d-809a-960e782eb1e7` is shown below: http://paste.openstack.org/show/753805/ Note: For v2 apis, the request_id is not returned in response header but it will be logged in logs. APIImpact: responses of the API will include 'x-openstack-request-id' header. Implements: blueprint oslo-middleware-request-id Change-Id: I437f783787514ff1add2d7f0059cb27addd12c3e
12 lines
621 B
YAML
12 lines
621 B
YAML
---
|
|
features:
|
|
- |
|
|
Blazar now uses oslo.middleware for request_id processing which will now
|
|
return a new `X-OpenStack-Request-ID`_ header in the response to each Restful API request.
|
|
Also, operators can see request_id, user_id and project_id by default in logs for better tracing
|
|
and it is configurable via the ``[DEFAULT]/logging_context_format_string`` `option`_.
|
|
|
|
|
|
.. _`X-OpenStack-Request-ID`: https://developer.openstack.org/api-ref/reservation/v1/index.html#request-id
|
|
.. _`option`: https://docs.openstack.org/oslo.log/latest/configuration/index.html#DEFAULT.logging_context_format_string
|