retina icon indicating copy to clipboard operation
retina copied to clipboard

fix: enable annotations

Open alexcastilio opened this issue 9 months ago • 2 comments

Description

Feature description: when using option enableAnnotation: true advanced metrics should only be generated for pods annotated with retina.sh: observe or pods in a namespace with that annotation.

Bug: When enableAnnotation: true advanced metrics are still being generated for all pods.

Fix:

  • add filtering to metrics module based on IPs stored on its cache
  • fixed documentation to reflect current behavior (kube-system namespace is not generating metrics by default)

Related Issue

x

Checklist

  • [x] I have read the contributing documentation.
  • [x] I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • [x] I have correctly attributed the author(s) of the code.
  • [x] I have tested the changes locally.
  • [x] I have followed the project's style guidelines.
  • [x] I have updated the documentation, if necessary.
  • [x] I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Namespace without annotation: image

Retina agent logs before annotating: image

Retina agent metrics before annotation:

# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0.000141203
go_gc_duration_seconds{quantile="0.25"} 0.000247904
go_gc_duration_seconds{quantile="0.5"} 0.000366208
go_gc_duration_seconds{quantile="0.75"} 0.00056051
go_gc_duration_seconds{quantile="1"} 0.001654131
go_gc_duration_seconds_sum 0.018364692
go_gc_duration_seconds_count 38
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 100
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 9.223372036854776e+18
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 110
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.24.1"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 5.6582616e+07
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 2.085932904e+09
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.764249e+06
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 1.7801147e+07
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 4.926152e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 5.6582616e+07
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 6.6658304e+07
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 6.8345856e+07
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 411633
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 8.716288e+06
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 1.3500416e+08
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 1.7455675433045332e+09
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 1.821278e+07
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 77312
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 78520
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 1.15792e+06
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 1.7952e+06
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 1.22507786e+08
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 8.905972e+06
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 3.407872e+06
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 3.407872e+06
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.55882125e+08
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
go_sched_gomaxprocs_threads 64
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 59
# HELP networkobservability_adv_node_apiserver_latency Latency of node apiserver in ms
# TYPE networkobservability_adv_node_apiserver_latency histogram
networkobservability_adv_node_apiserver_latency_bucket{le="0"} 4668
networkobservability_adv_node_apiserver_latency_bucket{le="0.5"} 4668
networkobservability_adv_node_apiserver_latency_bucket{le="1"} 5220
networkobservability_adv_node_apiserver_latency_bucket{le="1.5"} 5220
networkobservability_adv_node_apiserver_latency_bucket{le="2"} 5610
networkobservability_adv_node_apiserver_latency_bucket{le="2.5"} 5610
networkobservability_adv_node_apiserver_latency_bucket{le="3"} 5778
networkobservability_adv_node_apiserver_latency_bucket{le="3.5"} 5778
networkobservability_adv_node_apiserver_latency_bucket{le="4"} 5844
networkobservability_adv_node_apiserver_latency_bucket{le="4.5"} 5844
networkobservability_adv_node_apiserver_latency_bucket{le="+Inf"} 9225
networkobservability_adv_node_apiserver_latency_sum 14980
networkobservability_adv_node_apiserver_latency_count 9225
# HELP networkobservability_adv_node_apiserver_no_response Number of packets that did not get a response from node apiserver
# TYPE networkobservability_adv_node_apiserver_no_response counter
networkobservability_adv_node_apiserver_no_response{no_response="no_response"} 3877
# HELP networkobservability_adv_node_apiserver_tcp_handshake_latency Latency of node apiserver tcp handshake in ms
# TYPE networkobservability_adv_node_apiserver_tcp_handshake_latency histogram
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="0"} 0
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="0.5"} 0
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="1"} 8
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="1.5"} 8
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="2"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="2.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="3"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="3.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="4"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="4.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="+Inf"} 13
networkobservability_adv_node_apiserver_tcp_handshake_latency_sum 31
networkobservability_adv_node_apiserver_tcp_handshake_latency_count 13
# HELP networkobservability_dns_request_count DNS requests by statistics
# TYPE networkobservability_dns_request_count counter
networkobservability_dns_request_count 1192
# HELP networkobservability_dns_response_count DNS responses by statistics
# TYPE networkobservability_dns_response_count counter
networkobservability_dns_response_count 636
# HELP networkobservability_forward_bytes Total forwarded bytes
# TYPE networkobservability_forward_bytes gauge
networkobservability_forward_bytes{direction="egress"} 2.43025672e+08
networkobservability_forward_bytes{direction="ingress"} 3.16481913e+08
# HELP networkobservability_forward_count Total forwarded packets
# TYPE networkobservability_forward_count gauge
networkobservability_forward_count{direction="egress"} 231234
networkobservability_forward_count{direction="ingress"} 199584
# HELP networkobservability_tcp_connection_remote Number of active TCP connections by remote address
# TYPE networkobservability_tcp_connection_remote gauge
networkobservability_tcp_connection_remote{address="AllIPs"} 172
# HELP networkobservability_tcp_connection_stats TCP connections statistics
# TYPE networkobservability_tcp_connection_stats gauge
networkobservability_tcp_connection_stats{statistic_name="TCPLossProbes"} 133
networkobservability_tcp_connection_stats{statistic_name="TCPLostRetransmit"} 27
networkobservability_tcp_connection_stats{statistic_name="TCPTimeouts"} 41
# HELP networkobservability_tcp_state Number of active TCP connections by state
# TYPE networkobservability_tcp_state gauge
networkobservability_tcp_state{state="ESTABLISHED"} 12
networkobservability_tcp_state{state="LISTEN"} 12
networkobservability_tcp_state{state="TIME_WAIT"} 148
# HELP networkobservability_udp_connection_stats UDP connections statistics
# TYPE networkobservability_udp_connection_stats gauge
networkobservability_udp_connection_stats{statistic_name="ACTIVE"} 3
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 63.71
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.
# TYPE process_network_receive_bytes_total counter
process_network_receive_bytes_total 1.2352170602e+10
# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.
# TYPE process_network_transmit_bytes_total counter
process_network_transmit_bytes_total 2.0733816371e+10
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 261
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.61210112e+08
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.74556519627e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 4.439564288e+09
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19

Annotation added: image

Retina agent logs after annotation: image

Retina agent metrics after annotation:

# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0.000141203
go_gc_duration_seconds{quantile="0.25"} 0.000264406
go_gc_duration_seconds{quantile="0.5"} 0.000361608
go_gc_duration_seconds{quantile="0.75"} 0.00056051
go_gc_duration_seconds{quantile="1"} 0.001654131
go_gc_duration_seconds_sum 0.019019104
go_gc_duration_seconds_count 40
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 100
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 9.223372036854776e+18
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 109
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.24.1"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 6.0938608e+07
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 2.212964048e+09
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.766641e+06
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 1.8884729e+07
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 4.926152e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 6.0938608e+07
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 6.4036864e+07
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 7.0836224e+07
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 456008
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 1.0272768e+07
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 1.34873088e+08
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 1.7455676821034563e+09
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 1.9340737e+07
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 77312
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 78520
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 1.17056e+06
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 1.7952e+06
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 1.1677089e+08
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 8.90358e+06
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 3.538944e+06
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 3.538944e+06
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.55882125e+08
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
go_sched_gomaxprocs_threads 64
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 59
# HELP networkobservability_adv_forward_bytes Total number of forwarded bytes
# TYPE networkobservability_adv_forward_bytes gauge
networkobservability_adv_forward_bytes{direction="egress",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 6250
networkobservability_adv_forward_bytes{direction="ingress",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 6934
# HELP networkobservability_adv_forward_count Total number of forwarded packets
# TYPE networkobservability_adv_forward_count gauge
networkobservability_adv_forward_count{direction="egress",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 63
networkobservability_adv_forward_count{direction="ingress",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 70
# HELP networkobservability_adv_node_apiserver_latency Latency of node apiserver in ms
# TYPE networkobservability_adv_node_apiserver_latency histogram
networkobservability_adv_node_apiserver_latency_bucket{le="0"} 4977
networkobservability_adv_node_apiserver_latency_bucket{le="0.5"} 4977
networkobservability_adv_node_apiserver_latency_bucket{le="1"} 5567
networkobservability_adv_node_apiserver_latency_bucket{le="1.5"} 5567
networkobservability_adv_node_apiserver_latency_bucket{le="2"} 5981
networkobservability_adv_node_apiserver_latency_bucket{le="2.5"} 5981
networkobservability_adv_node_apiserver_latency_bucket{le="3"} 6171
networkobservability_adv_node_apiserver_latency_bucket{le="3.5"} 6171
networkobservability_adv_node_apiserver_latency_bucket{le="4"} 6243
networkobservability_adv_node_apiserver_latency_bucket{le="4.5"} 6243
networkobservability_adv_node_apiserver_latency_bucket{le="+Inf"} 9873
networkobservability_adv_node_apiserver_latency_sum 18792
networkobservability_adv_node_apiserver_latency_count 9873
# HELP networkobservability_adv_node_apiserver_no_response Number of packets that did not get a response from node apiserver
# TYPE networkobservability_adv_node_apiserver_no_response counter
networkobservability_adv_node_apiserver_no_response{no_response="no_response"} 4120
# HELP networkobservability_adv_node_apiserver_tcp_handshake_latency Latency of node apiserver tcp handshake in ms
# TYPE networkobservability_adv_node_apiserver_tcp_handshake_latency histogram
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="0"} 0
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="0.5"} 0
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="1"} 8
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="1.5"} 8
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="2"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="2.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="3"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="3.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="4"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="4.5"} 12
networkobservability_adv_node_apiserver_tcp_handshake_latency_bucket{le="+Inf"} 13
networkobservability_adv_node_apiserver_tcp_handshake_latency_sum 31
networkobservability_adv_node_apiserver_tcp_handshake_latency_count 13
# HELP networkobservability_adv_tcpflags_count Total number of packets by TCP flag
# TYPE networkobservability_adv_tcpflags_count gauge
networkobservability_adv_tcpflags_count{flag="ACK",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 113
networkobservability_adv_tcpflags_count{flag="FIN",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 20
networkobservability_adv_tcpflags_count{flag="PSH",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 34
networkobservability_adv_tcpflags_count{flag="SYN",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 10
networkobservability_adv_tcpflags_count{flag="SYNACK",ip="100.64.9.173",namespace="kube-system",podname="retina-operator-bffb4569f-4sllj",workload_kind="ReplicaSet",workload_name="retina-operator-bffb4569f"} 10
# HELP networkobservability_dns_request_count DNS requests by statistics
# TYPE networkobservability_dns_request_count counter
networkobservability_dns_request_count 1312
# HELP networkobservability_dns_response_count DNS responses by statistics
# TYPE networkobservability_dns_response_count counter
networkobservability_dns_response_count 706
# HELP networkobservability_forward_bytes Total forwarded bytes
# TYPE networkobservability_forward_bytes gauge
networkobservability_forward_bytes{direction="egress"} 2.57174993e+08
networkobservability_forward_bytes{direction="ingress"} 3.35559404e+08
# HELP networkobservability_forward_count Total forwarded packets
# TYPE networkobservability_forward_count gauge
networkobservability_forward_count{direction="egress"} 245323
networkobservability_forward_count{direction="ingress"} 211809
# HELP networkobservability_tcp_connection_remote Number of active TCP connections by remote address
# TYPE networkobservability_tcp_connection_remote gauge
networkobservability_tcp_connection_remote{address="AllIPs"} 179
# HELP networkobservability_tcp_connection_stats TCP connections statistics
# TYPE networkobservability_tcp_connection_stats gauge
networkobservability_tcp_connection_stats{statistic_name="TCPLossProbes"} 133
networkobservability_tcp_connection_stats{statistic_name="TCPLostRetransmit"} 27
networkobservability_tcp_connection_stats{statistic_name="TCPTimeouts"} 41
# HELP networkobservability_tcp_state Number of active TCP connections by state
# TYPE networkobservability_tcp_state gauge
networkobservability_tcp_state{state="ESTABLISHED"} 14
networkobservability_tcp_state{state="LISTEN"} 12
networkobservability_tcp_state{state="TIME_WAIT"} 153
# HELP networkobservability_udp_connection_stats UDP connections statistics
# TYPE networkobservability_udp_connection_stats gauge
networkobservability_udp_connection_stats{statistic_name="ACTIVE"} 3
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 67.59
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.
# TYPE process_network_receive_bytes_total counter
process_network_receive_bytes_total 1.2362491689e+10
# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.
# TYPE process_network_transmit_bytes_total counter
process_network_transmit_bytes_total 2.0755089749e+10
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 261
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.59534848e+08
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.74556519627e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 4.439564288e+09
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

alexcastilio avatar Mar 25 '25 09:03 alexcastilio

Can we have a testing done section ?

vakalapa avatar Apr 24 '25 15:04 vakalapa

Can we have a testing done section ?

@vakalapa PR description updated with test details.

alexcastilio avatar Apr 25 '25 08:04 alexcastilio

This PR will be closed in 7 days due to inactivity.

github-actions[bot] avatar Jun 29 '25 00:06 github-actions[bot]

Can we identify when this regressed? It's a pretty massive functionality bug this PR is addressing

rectified95 avatar Jul 01 '25 17:07 rectified95

Can we identify when this regressed? It's a pretty massive functionality bug this PR is addressing

I searched for it but could not identify the regression point.

alexcastilio avatar Jul 02 '25 16:07 alexcastilio

Can you edit the PR description to demonstrate the before/after of the fix,? Currently it only shows that for applying an annotation. For better readability, I'd just include a snippet of the metric output showing the relevant namespaces, no need to apste the whole thing.

rectified95 avatar Jul 03 '25 20:07 rectified95

Can you edit the PR description to demonstrate the before/after of the fix,? Currently it only shows that for applying an annotation. For better readability, I'd just include a snippet of the metric output showing the relevant namespaces, no need to apste the whole thing.

@rectified95 PR description updated

alexcastilio avatar Jul 04 '25 11:07 alexcastilio

Closed. Replaced by #1806

alexcastilio avatar Aug 07 '25 14:08 alexcastilio