2 This work is licensed under a Creative Commons Attribution 4.0
9 The purpose of logging is to generate machine-readable, indexable output logs
11 requests through sub-component, it need to ship logs to logging enhancement
13 logging analysis system capturing diagnostic information.
20 So far the logging of multi-vim is not able to support customer configuration,
21 handler context specific logging like
22 MDC[MDC_Document]_, also it dose't propagate transaction-ID in REST headers
23 which is critical to tracing request.
24 There are 4 python containers in oom project need to configure filebeat
25 container for shipping logs.
27 .. [MDC_Document] https://wiki.onap.org/display/DW/ONAP+Application+Logging+Guidelines+v1.1#ONAPApplicationLoggingGuidelinesv1.1-MDCs
29 In addition the current logging is very difficult to understand behavior
36 The proposed change will include three parts.
41 Logging architecture[Log_Architecture]_ use Filebeat collects logs from
42 multi-vim containers and ships them to the
43 centralized logging stack. To enable this feature it need to add Filebeat
44 container in multi-vim pod that was
45 deployed by OOM, as well Yaml file will be used to configure Filebeat.
47 .. [Log_Architecture] https://wiki.onap.org/display/DW/Logging+Architecture
52 ONAP logging uses a global unique "RequestID"[RequestID_Document]_ in logging
53 to track the processing of each request
54 across all the components, multi-vim will receive this id from http header
55 by vary "X-TransactionID", then record it
57 Meanwhile single component should generate a InvocationID that records the
58 relationship between RequestID
59 and InvocationID for proper tracing. So Mulit-vim will set unique InvocationID
60 for each single request,also output it in logs.
62 .. [RequestID_Document] https://wiki.onap.org/pages/viewpage.action?pageId=20087036#ONAPApplicationLoggingGuidelinesv1.2(Beijing)-MDC-RequestID
65 python AOP logging library
66 --------------------------
68 Currently logging enhancement project just has java AOP logging library, For
69 multi-vim which based on python need
70 a python version. The basic feature of AOP logging library could provide
71 customer configuration include retention
72 policy、output location、text output format、message level and so on, support
73 MDC context specific logging, able to
74 change configuration at runtime, and make logging quite fast.