blob: 5fb639e6b291b0580621a3dd1fec4bc545276ccc [file] [log] [blame]
liangke6cb3c152018-01-29 16:25:08 +08001..
2 This work is licensed under a Creative Commons Attribution 4.0
3 International License.
4
5=================
6Multi-Vim logging
7=================
8
9The purpose of logging is to generate machine-readable, indexable output logs and support to trace
10requests through sub-component, it need to ship logs to logging enhancement project a centralized
11logging analysis system capturing diagnostic information.
12
13
14
15Problem Description
16===================
17
18So far the logging of multi-vim is not able to support customer configuration, handler context specific logging like
19MDC[MDC_Document]_, also it dose't propagate transaction-ID in REST headers which is critical to tracing request.
20There are 4 python containers in oom project need to configure filebeat container for shipping logs.
21
22.. [MDC_Document] https://wiki.onap.org/display/DW/ONAP+Application+Logging+Guidelines+v1.1#ONAPApplicationLoggingGuidelinesv1.1-MDCs
23
24In addition the current logging is very difficult to understand behavior and performance.
25
26
27Proposed Change
28===============
29
30The proposed change will include three parts.
31
32Filebeat container
33------------------
34
35Logging architecture[Log_Architecture]_ use Filebeat collects logs from multi-vim containers and ships them to the
36centralized logging stack. To enable this feature it need to add Filebeat container in multi-vim pod that was
37deployed by OOM, as well Yaml file will be used to configure Filebeat.
38
39.. [Log_Architecture] https://wiki.onap.org/display/DW/Logging+Architecture
40
41Tracing ID
42----------
43
44ONAP logging uses a global unique "RequestID"[RequestID_Document]_ in logging to track the processing of each request
45across all the components, multi-vim will receive this id from http header by vary "X-TransactionID", then record it
46in logs.
47Meanwhile single component should generate a InvocationID that records the relationship between RequestID
48and InvocationID for proper tracing. So Mulit-vim will set unique InvocationID for each single request,also output it
49in logs.
50
51.. [RequestID_Document] https://wiki.onap.org/pages/viewpage.action?pageId=20087036#ONAPApplicationLoggingGuidelinesv1.2(Beijing)-MDC-RequestID
52
53
54python AOP logging library
55--------------------------
56
57Currently logging enhancement project just has java AOP logging library, For multi-vim which based on python need
58a python version. The basic feature of AOP logging library could provide customer configuration include retention
59policy、output location、text output format、message level and so on, support MDC context specific logging, able to
60change configuration at runtime, and make logging quite fast.
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83