From ec7cdc4cc560150673f14c84a326f6a72d43d3e1 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Sun, 14 May 2017 07:14:25 -0400 Subject: Add global_request_id to context This provides the facility to have a global_request_id which is different from the service level request_id that we've been using. Includes basic testing. Change-Id: I1521188ae627fa2e7d35aa2ffffbcb620c527765 --- doc/source/usage.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 8c84163..6674613 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -26,8 +26,8 @@ Source: :ref:`example_usage_simple.py` 2016-01-20 21:56:29.283 8428 INFO __main__ [-] Message without context 2016-01-20 21:56:29.284 8428 INFO __main__ [req-929d23e9-f50e-46ae-a8a7-02bc8c3fd2c8 - - - - -] Message with context -The format of these log records are defined by the -`logging_default_format_string`_ and `logging_context_format_string`_ +The format of these log records are defined by the +`logging_default_format_string`_ and `logging_context_format_string`_ configuration options respectively. The `logging_user_identity_format`_ option also provides further context aware definition flexibility. @@ -39,9 +39,12 @@ also provides further context aware definition flexibility. Context Variables ----------------- -The oslo.context variables used in the **logging_context_format_string** and +The oslo.context variables used in the **logging_context_format_string** and **logging_user_identity_format** configuration options include: +* global_request_id - A request id + (e.g. req-9f2c484a-b504-4fd9-b44c-4357544cca50) which may have been + sent in from another service to indicate this is part of a chain of requests. * request_id - A request id (e.g. req-9f2c484a-b504-4fd9-b44c-4357544cca50) * user - A user id (e.g. e5bc7033e6b7473c9fe8ee1bd4df79a3) * tenant - A tenant/project id (e.g. 79e338475db84f7c91ee4e86b79b34c1) -- cgit v1.2.1