[openstack-dev] [oslo][oslo.log] JSON logs are missing the request ID

Saverio Proto saverio.proto at switch.ch
Mon Jan 22 17:45:15 UTC 2018


Hello Doug,

in the extra session I see just {"project": "unknown", "version": "unknown"}

here a full line from nova-api:

{"thread_name": "MainThread", "extra": {"project": "unknown", "version":
"unknown"}, "process": 31142, "relative_created": 3459415335.4091644,
"module": "wsgi", "message":
"2001:xxx:xxxx:8100::80,2001:xxx:xxxx:81ff::b0 \"GET
/v2/64b5b50eb21d4efe9783eb1d81a9ec65/os-services HTTP/1.1\" status: 200
len: 1812 time: 0.1813300", "hostname": "nova-0", "filename": "wsgi.py",
"levelno": 20, "lineno": 555, "asctime": "2018-01-22 18:37:02,312",
"msg": "2001:xxx:xxxx:8100::80,2001:xxx:xxxx:81ff::b0 \"GET
/v2/64b5b50eb21d4efe9783eb1d81a9ec65/os-services HTTP/1.1\" status: 200
len: 1812 time: 0.1813300", "args": [], "process_name": "MainProcess",
"name": "nova.osapi_compute.wsgi.server", "thread": 140414249163824,
"created": 1516642622.312235, "traceback": null, "msecs":
312.23511695861816, "funcname": "handle_one_response", "pathname":
"/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", "levelname": "INFO"}

thank you

Saverio

On 22.01.18 15:33, Doug Hellmann wrote:
> Excerpts from Saverio Proto's message of 2018-01-21 18:09:03 +0100:
>> Hello,
>>
>> I figured out a bug is already open since a long time :(
>> https://bugs.launchpad.net/oslo.log/+bug/1564931
>>
>> And there is already a review:
>> https://review.openstack.org/#/c/367514/
>>
>> it looks like the review was not merged, and it went to abandoned
>> because of no progress on it for long time.
>>
>> I rebased that code on the current master:
>> https://review.openstack.org/536149
> 
> That patch is not needed on master.
> 
> We added the full context as a nested value under the "context" key when
> http://git.openstack.org/cgit/openstack/oslo.log/commit/oslo_log/formatters.py?id=1b012d0fc6811f00e032e52ed586fe37e157584d
> landed. That change was released as part of 3.35.0 and as the test in
> https://review.openstack.org/#/c/536164/ shows the request_id and
> global_request_id values are present in the output.
> 
> Before that change (and after, as part of our effort to maintain
> backwards compatibility) the values from the context were added to the
> "extra" section of the output message. That behavior is present in
> 
> master: http://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py?h=master#n246
> pike: http://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py?h=stable%2Fpike#n300
> ocata: http://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py?h=stable%2Focata#n156
> 
> It also appears to be present for newton, the version you said you are
> using:
> 
> http://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py?h=newton-eol#n153
> 
> Have you looked at the "extras" section of the log output?
> 
> Could you provide some sample log output?
> 
> Doug
> 
>>
>> Saverio
>>
>> On 18.01.18 18:14, Doug Hellmann wrote:
>>> Excerpts from Doug Hellmann's message of 2018-01-18 11:45:28 -0500:
>>>> Excerpts from Saverio Proto's message of 2018-01-18 14:49:21 +0100:
>>>>> Hello all,
>>>>>
>>>>> well this oslo.log library looks like a core thing that is used by
>>>>> multiple projects. I feel scared hearing that bugs opened on that
>>>>> project are probably just ignored.
>>>>>
>>>>> should I reach out to the current PTL of OSLO ?
>>>>> https://github.com/openstack/governance/blob/master/reference/projects.yaml#L2580
>>>>>
>>>>> ChangBo Guo are you reading this thread ? Do you think this is a bug or
>>>>> a missing feature ? And moreover is really nobody looking at these
>>>>> oslo.log bugs ?
>>>>
>>>> The Oslo team is small, but we do pay attention to bug reports. I
>>>> don't think this issue is going to rise to the level of "drop what
>>>> you're doing and help because the world is on fire", so I think
>>>> Sean is just encouraging you to have a little patience.
>>>>
>>>> Please do go ahead and open a bug and attach (or paste into the
>>>> description) an example of what the log output for your service looks
>>>> like.
>>>>
>>>> Doug
>>>
>>> Earlier in the thread you mentioned running the newton versions of
>>> neutron and oslo.log. The newton release has been marked end-of-life
>>> and is not supported by the community any longer. You may find
>>> support from your vendor, but if you're deploying on your own we'll
>>> have to work something else out. If we determine that this is a bug
>>> in the newton version of the library I won't have any way to give
>>> you a new release because the branch is closed.
>>>
>>> It should be possible for you to update just oslo.log to a more
>>> recent (and supported), although to do so you would have to get the
>>> package separately or build your own and that may complicate your
>>> deployment.
>>>
>>> More recent versions of the JSON formatter change the structure of
>>> the data to include the entire context (including the request id)
>>> in a separate key.  Are you updating to newton as part of upgrading
>>> further than that?  If so, we probably want to wait to debug this
>>> until you hit the latest supported version you're planning to deploy,
>>> in case the problem is already fixed there.
>>>
>>> Doug
>>>
>>> __________________________________________________________________________
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 


-- 
SWITCH
Saverio Proto, Peta Solutions
Werdstrasse 2, P.O. Box, 8021 Zurich, Switzerland
phone +41 44 268 15 15, direct +41 44 268 1573
saverio.proto at switch.ch, http://www.switch.ch

http://www.switch.ch/stories



More information about the OpenStack-dev mailing list