Commit 560cf9a
authored
feat: refactor cni telemetry (#3149)
* move telemetry to dedicated package and create package variable
* send telemetry for ipam config, epinfo, and error on cni add completion
* add new telemetry logs for debugging
* replace nwcfg subcontext with containerid for correlation
* add mutex
* address linter issues
* add unit tests
* set operation id before sending any events for sampling
* remove newly added telemetry events
we will split this part of the pr into its own pr
a telemetry event was added back which was previously removed
undo this pr to add those telemetry statements back
* refactor plugin main
remove reflect
remove duplicated telemetry and telemetry buffer
remove unused fields in report manager
force access to telemetry client fields through methods
move telemetry start/connect code closer to start of plugin execution
* add unit tests and simplify
we use SendError where we would have previously called reportPluginError (no log emitted)
we don't set error message in cni report because the error message and event message fields both end up in the Message field in the cni telemetry service
* remove duplicate error telemetry
* fix comment
* remove writing telemetry events to the log file
* address feedback
* remove stutter
* remove unused map (noop)
* address feedback
* fix condition
* align flow with previous telemetry flow
tested and none panic:
telemetry service running, lock acquired
telemetry service not running, lock acquired
telemetry service running, lock not acquired
telemetry service not running, lock not acquired
stateless if telemetry service not running
stateless if telemetry service is running
* address linter
* re-implement add and delete timing metrics1 parent 6494e4c commit 560cf9a
File tree
15 files changed
+327
-303
lines changed- cni/network
- plugin
- stateless
- network
- telemetry
15 files changed
+327
-303
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 15 | | |
28 | 16 | | |
29 | 17 | | |
| |||
0 commit comments