feat(docs): Fix images and ToC
[csit.git] / docs / content / methodology / telemetry.md
1 ---
2 title: "Telemetry"
3 weight: 20
4 ---
5
6 # Telemetry
7
8 OpenMetrics specifies the de-facto standard for transmitting cloud-native
9 metrics at scale, with support for both text representation and Protocol
10 Buffers.
11
12 ## RFC
13
14 - RFC2119
15 - RFC5234
16 - RFC8174
17 - draft-richih-opsawg-openmetrics-00
18
19 ## Reference
20
21 [OpenMetrics](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md)
22
23 ## Metric Types
24
25 - Gauge
26 - Counter
27 - StateSet
28 - Info
29 - Histogram
30 - GaugeHistogram
31 - Summary
32 - Unknown
33
34 Telemetry module in CSIT currently support only Gauge, Counter and Info.
35
36 ## Anatomy of CSIT telemetry implementation
37
38 Existing implementation consists of several measurment building blocks:
39 the main measuring block running search algorithms (MLR, PLR, SOAK, MRR, ...),
40 the latency measuring block and the several telemetry blocks with or without
41 traffic running on a background.
42
43 The main measuring block must not be interrupted by any read operation that can
44 impact data plane traffic processing during throughput search algorithm. Thus
45 operational reads are done before (pre-stat) and after (post-stat) that block.
46
47 Some operational reads must be done while traffic is running and usually
48 consists of two reads (pre-run-stat, post-run-stat) with defined delay between
49 them.
50
51 ## MRR measurement
52
53   traffic_start(r=mrr)               traffic_stop       |<     measure     >|
54     |                                  |                |      (r=mrr)      |
55     |   pre_run_stat   post_run_stat   |    pre_stat    |                   |  post_stat
56     |        |               |         |       |        |                   |      |
57   --o--------o---------------o---------o-------o--------+-------------------+------o------------>
58                                                                                               t
59
60   Legend:
61     - pre_run_stat
62       - vpp-clear-runtime
63     - post_run_stat
64       - vpp-show-runtime
65       - bash-perf-stat            // if extended_debug == True
66     - pre_stat
67       - vpp-clear-stats
68       - vpp-enable-packettrace    // if extended_debug == True
69       - vpp-enable-elog
70     - post_stat
71       - vpp-show-stats
72       - vpp-show-packettrace      // if extended_debug == True
73       - vpp-show-elog
74
75
76     |<                                measure                                 >|
77     |                                 (r=mrr)                                  |
78     |                                                                          |
79     |<    traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
80     |    (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
81     |                        |                        |                        |
82   --o------------------------o------------------------o------------------------o--->
83                                                                                  t
84
85
86 ## MLR measurement
87
88     |<     measure     >|   traffic_start(r=pdr)               traffic_stop   traffic_start(r=ndr)               traffic_stop  |< [    latency    ] >|
89     |      (r=mlr)      |    |                                  |              |                                  |            |     .9/.5/.1/.0     |
90     |                   |    |   pre_run_stat   post_run_stat   |              |   pre_run_stat   post_run_stat   |            |                     |
91     |                   |    |        |               |         |              |        |               |         |            |                     |
92   --+-------------------+----o--------o---------------o---------o--------------o--------o---------------o---------o------------[---------------------]--->
93                                                                                                                                                        t
94
95   Legend:
96     - pre_run_stat
97       - vpp-clear-runtime
98     - post_run_stat
99       - vpp-show-runtime
100       - bash-perf-stat          // if extended_debug == True
101     - pre_stat
102       - vpp-clear-stats
103       - vpp-enable-packettrace  // if extended_debug == True
104       - vpp-enable-elog
105     - post_stat
106       - vpp-show-stats
107       - vpp-show-packettrace    // if extended_debug == True
108       - vpp-show-elog
109
110
111 ## MRR measurement
112
113     traffic_start(r=mrr)               traffic_stop                 |<     measure     >|
114       |                                  |                          |      (r=mrr)      |
115       |   |<      stat_runtime      >|   |          stat_pre_trial  |                   |  stat_post_trial
116       |   |                          |   |             |            |                   |     |
117   ----o---+--------------------------+---o-------------o------------+-------------------+-----o------------->
118                                                                                                           t
119
120   Legend:
121     - stat_runtime
122       - vpp-runtime
123     - stat_pre_trial
124       - vpp-clear-stats
125       - vpp-enable-packettrace  // if extended_debug == True
126     - stat_post_trial
127       - vpp-show-stats
128       - vpp-show-packettrace    // if extended_debug == True
129
130
131     |<                                measure                                 >|
132     |                                 (r=mrr)                                  |
133     |                                                                          |
134     |<    traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
135     |    (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
136     |                        |                        |                        |
137   --o------------------------o------------------------o------------------------o--->
138                                                                                  t
139
140
141     |<                              stat_runtime                              >|
142     |                                                                          |
143     |<       program0       >|<       program1       >|<       programN       >|
144     |       (@=params)       |       (@=params)       |       (@=params)       |
145     |                        |                        |                        |
146   --o------------------------o------------------------o------------------------o--->
147                                                                                  t
148
149
150 ## MLR measurement
151
152     |<     measure     >|   traffic_start(r=pdr)               traffic_stop   traffic_start(r=ndr)               traffic_stop  |< [    latency    ] >|
153     |      (r=mlr)      |     |                                  |              |                                  |           |     .9/.5/.1/.0     |
154     |                   |     |   |<      stat_runtime      >|   |              |   |<      stat_runtime      >|   |           |                     |
155     |                   |     |   |                          |   |              |   |                          |   |           |                     |
156   --+-------------------+-----o---+--------------------------+---o--------------o---+--------------------------+---o-----------[---------------------]--->
157                                                                                                                                                        t
158
159   Legend:
160     - stat_runtime
161       - vpp-runtime
162     - stat_pre_trial
163       - vpp-clear-stats
164       - vpp-enable-packettrace  // if extended_debug == True
165     - stat_post_trial
166       - vpp-show-stats
167       - vpp-show-packettrace    // if extended_debug == True