C-Docs: New structure
[csit.git] / docs / content / methodology / measurements / telemetry.md
1 ---
2 title: "Telemetry"
3 weight: 3
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     Legend:
60     - pre_run_stat
61       - vpp-clear-runtime
62     - post_run_stat
63       - vpp-show-runtime
64       - bash-perf-stat            // if extended_debug == True
65     - pre_stat
66       - vpp-clear-stats
67       - vpp-enable-packettrace    // if extended_debug == True
68       - vpp-enable-elog
69     - post_stat
70       - vpp-show-stats
71       - vpp-show-packettrace      // if extended_debug == True
72       - vpp-show-elog
73
74     |<                               measure                                 >|
75     |                                (r=mrr)                                  |
76     |                                                                         |
77     |<   traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
78     |   (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
79     |                       |                        |                        |
80     o-----------------------o------------------------o------------------------o--->
81                                                                                  t
82
83
84 ## MLR measurement
85
86     |<  measure  >|   traffic_start(r=pdr)             traffic_stop  traffic_start(r=ndr)             traffic_stop |< [   latency   ] >|
87     |   (r=mlr)   |   |                                |             |                                |            |    .9/.5/.1/.0    |
88     |             |   |  pre_run_stat   post_run_stat  |             |  pre_run_stat   post_run_stat  |            |                   |
89     |             |   |       |               |        |             |       |               |        |            |                   |
90     +-------------+---o-------o---------------o--------o-------------o-------o---------------o--------o------------[-------------------]--->
91                                                                                                                                           t
92     Legend:
93     - pre_run_stat
94       - vpp-clear-runtime
95     - post_run_stat
96       - vpp-show-runtime
97       - bash-perf-stat          // if extended_debug == True
98     - pre_stat
99       - vpp-clear-stats
100       - vpp-enable-packettrace  // if extended_debug == True
101       - vpp-enable-elog
102     - post_stat
103       - vpp-show-stats
104       - vpp-show-packettrace    // if extended_debug == True
105       - vpp-show-elog
106
107 ## MRR measurement
108
109     traffic_start(r=mrr)       traffic_stop        |<  measure  >|
110     |                          |                   |   (r=mrr)   |
111     |   |<  stat_runtime  >|   |   stat_pre_trial  |             |  stat_post_trial
112     |   |                  |   |      |            |             |    |
113     o---+------------------+---o------o------------+-------------+----o------------>
114                                                                                   t
115     Legend:
116     - stat_runtime
117       - vpp-runtime
118     - stat_pre_trial
119       - vpp-clear-stats
120       - vpp-enable-packettrace  // if extended_debug == True
121     - stat_post_trial
122       - vpp-show-stats
123       - vpp-show-packettrace    // if extended_debug == True
124
125     |<                                measure                                 >|
126     |                                 (r=mrr)                                  |
127     |                                                                          |
128     |<    traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
129     |    (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
130     |                        |                        |                        |
131     o------------------------o------------------------o------------------------o--->
132                                                                                   t
133
134     |<                              stat_runtime                              >|
135     |                                                                          |
136     |<       program0       >|<       program1       >|<       programN       >|
137     |       (@=params)       |       (@=params)       |       (@=params)       |
138     |                        |                        |                        |
139     o------------------------o------------------------o------------------------o--->
140                                                                                   t
141
142 ## MLR measurement
143
144     |<  measure  >|   traffic_start(r=pdr)       traffic_stop   traffic_start(r=ndr)     traffic_stop  |< [  latency  ] >|
145     |   (r=mlr)   |   |                          |              |                          |           |   .9/.5/.1/.0   |
146     |             |   |   |<  stat_runtime  >|   |              |   |<  stat_runtime  >|   |           |                 |
147     |             |   |   |                  |   |              |   |                  |   |           |                 |
148     +-------------+---o---+------------------+---o--------------o---+------------------+---o-----------[-----------------]--->
149                                                                                                                             t
150     Legend:
151     - stat_runtime
152       - vpp-runtime
153     - stat_pre_trial
154       - vpp-clear-stats
155       - vpp-enable-packettrace  // if extended_debug == True
156     - stat_post_trial
157       - vpp-show-stats
158       - vpp-show-packettrace    // if extended_debug == True