Commit e60804c
authored
[xcvrd] add support for logging mux_metrics events into state DB (sonic-net#185)
* [xcvrd] add support for logging mux_metrics events into state DB
Description
This PR adds support for logging events for change requests received by xcvrd from swss into state DB.
a typical log would look like this:
1) "xcvrd_switch_standby_start"
2) "2021-05-13 10:01:15.690835"
3) "xcvrd_switch_standby_end"
4) "2021-05-13 10:01:15.696051"
where the key-value pairs signify the type of event requested out of
active/standby/unknown and the timestamp associated with the event.
Motivation and Context
This is required for xcvrd to log the events which it receives in form of requests from swss or any other module into the DB. The timestamp will be useful for debugging the timeline of an event processing from a perspective of other modules as well as xcvrd itself.
How Has This Been Tested?
ran the changes on starlab testbed, by changing the file in the container.
Signed-off-by: vaibhav-dahiya <[email protected]>1 parent 807b304 commit e60804c
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
1010 | 1011 | | |
1011 | 1012 | | |
1012 | 1013 | | |
| 1014 | + | |
1013 | 1015 | | |
1014 | 1016 | | |
1015 | 1017 | | |
| |||
1028 | 1030 | | |
1029 | 1031 | | |
1030 | 1032 | | |
| 1033 | + | |
| 1034 | + | |
1031 | 1035 | | |
1032 | 1036 | | |
1033 | 1037 | | |
| |||
1058 | 1062 | | |
1059 | 1063 | | |
1060 | 1064 | | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1061 | 1069 | | |
1062 | 1070 | | |
1063 | 1071 | | |
| |||
1091 | 1099 | | |
1092 | 1100 | | |
1093 | 1101 | | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1094 | 1106 | | |
1095 | 1107 | | |
1096 | 1108 | | |
| |||
0 commit comments