Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused double flush telemetry #32371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions pkg/network/ebpf/c/tracer/telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ enum telemetry_counter {
udp_send_processed,
udp_send_missed,
udp_dropped_conns,
double_flush_attempts_close,
double_flush_attempts_done,
unsupported_tcp_failures,
tcp_done_missing_pid,
tcp_connect_failed_tuple,
Expand Down Expand Up @@ -60,12 +58,6 @@ static __always_inline void increment_telemetry_count(enum telemetry_counter cou
case udp_dropped_conns:
__sync_fetch_and_add(&val->udp_dropped_conns, 1);
break;
case double_flush_attempts_close:
__sync_fetch_and_add(&val->double_flush_attempts_close, 1);
break;
case double_flush_attempts_done:
__sync_fetch_and_add(&val->double_flush_attempts_done, 1);
break;
case unsupported_tcp_failures:
__sync_fetch_and_add(&val->unsupported_tcp_failures, 1);
break;
Expand Down
2 changes: 0 additions & 2 deletions pkg/network/ebpf/c/tracer/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ typedef struct {
__u64 udp_sends_processed;
__u64 udp_sends_missed;
__u64 udp_dropped_conns;
__u64 double_flush_attempts_close;
__u64 double_flush_attempts_done;
__u64 unsupported_tcp_failures;
__u64 tcp_done_missing_pid;
__u64 tcp_connect_failed_tuple;
Expand Down
2 changes: 0 additions & 2 deletions pkg/network/ebpf/kprobe_types_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions pkg/network/tracer/connection/ebpf_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ var EbpfTracerTelemetry = struct { //nolint:revive // TODO
UdpSendsProcessed *prometheus.Desc //nolint:revive // TODO
UdpSendsMissed *prometheus.Desc //nolint:revive // TODO
UdpDroppedConns *prometheus.Desc //nolint:revive // TODO
// doubleFlushAttemptsClose is a counter measuring the number of attempts to flush a closed connection twice from tcp_close
doubleFlushAttemptsClose *prometheus.Desc
// doubleFlushAttemptsDone is a counter measuring the number of attempts to flush a closed connection twice from tcp_done
doubleFlushAttemptsDone *prometheus.Desc
// unsupportedTcpFailures is a counter measuring the number of attempts to flush a TCP failure that is not supported
unsupportedTcpFailures *prometheus.Desc //nolint:revive // TODO
// tcpDoneMissingPid is a counter measuring the number of TCP connections with a PID mismatch between tcp_connect and tcp_done
Expand All @@ -81,10 +77,6 @@ var EbpfTracerTelemetry = struct { //nolint:revive // TODO
lastUdpSendsProcessed *atomic.Int64 //nolint:revive // TODO
lastUdpSendsMissed *atomic.Int64 //nolint:revive // TODO
lastUdpDroppedConns *atomic.Int64 //nolint:revive // TODO
// lastDoubleFlushAttemptsClose is a counter measuring the diff between the last two values of doubleFlushAttemptsClose
lastDoubleFlushAttemptsClose *atomic.Int64
// lastDoubleFlushAttemptsDone is a counter measuring the diff between the last two values of doubleFlushAttemptsDone
lastDoubleFlushAttemptsDone *atomic.Int64
// lastUnsupportedTcpFailures is a counter measuring the diff between the last two values of unsupportedTcpFailures
lastUnsupportedTcpFailures *atomic.Int64 //nolint:revive // TODO
// lastTcpDoneMissingPid is a counter measuring the diff between the last two values of tcpDoneMissingPid
Expand All @@ -104,8 +96,6 @@ var EbpfTracerTelemetry = struct { //nolint:revive // TODO
prometheus.NewDesc(connTracerModuleName+"__udp_sends_processed", "Counter measuring the number of processed UDP sends in EBPF", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__udp_sends_missed", "Counter measuring failures to process UDP sends in EBPF", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__udp_dropped_conns", "Counter measuring the number of dropped UDP connections in the EBPF map", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__double_flush_attempts_close", "Counter measuring the number of attempts to flush a closed connection twice from tcp_close", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__double_flush_attempts_done", "Counter measuring the number of attempts to flush a closed connection twice from tcp_done", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__unsupported_tcp_failures", "Counter measuring the number of attempts to flush a TCP failure that is not supported", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__tcp_done_missing_pid", "Counter measuring the number of TCP connections with a missing PID in tcp_done", nil, nil),
prometheus.NewDesc(connTracerModuleName+"__tcp_connect_failed_tuple", "Counter measuring the number of failed TCP connections due to tuple collisions", nil, nil),
Expand Down Expand Up @@ -133,8 +123,6 @@ var EbpfTracerTelemetry = struct { //nolint:revive // TODO
atomic.NewInt64(0),
atomic.NewInt64(0),
atomic.NewInt64(0),
atomic.NewInt64(0),
atomic.NewInt64(0),
}

type ebpfTracer struct {
Expand Down Expand Up @@ -517,8 +505,6 @@ func (t *ebpfTracer) Describe(ch chan<- *prometheus.Desc) {
ch <- EbpfTracerTelemetry.UdpSendsProcessed
ch <- EbpfTracerTelemetry.UdpSendsMissed
ch <- EbpfTracerTelemetry.UdpDroppedConns
ch <- EbpfTracerTelemetry.doubleFlushAttemptsClose
ch <- EbpfTracerTelemetry.doubleFlushAttemptsDone
ch <- EbpfTracerTelemetry.unsupportedTcpFailures
ch <- EbpfTracerTelemetry.tcpDoneMissingPid
ch <- EbpfTracerTelemetry.tcpConnectFailedTuple
Expand Down Expand Up @@ -563,14 +549,6 @@ func (t *ebpfTracer) Collect(ch chan<- prometheus.Metric) {
EbpfTracerTelemetry.lastUdpDroppedConns.Store(int64(ebpfTelemetry.Udp_dropped_conns))
ch <- prometheus.MustNewConstMetric(EbpfTracerTelemetry.UdpDroppedConns, prometheus.CounterValue, float64(delta))

delta = int64(ebpfTelemetry.Double_flush_attempts_close) - EbpfTracerTelemetry.lastDoubleFlushAttemptsClose.Load()
EbpfTracerTelemetry.lastDoubleFlushAttemptsClose.Store(int64(ebpfTelemetry.Double_flush_attempts_close))
ch <- prometheus.MustNewConstMetric(EbpfTracerTelemetry.doubleFlushAttemptsClose, prometheus.CounterValue, float64(delta))

delta = int64(ebpfTelemetry.Double_flush_attempts_done) - EbpfTracerTelemetry.lastDoubleFlushAttemptsDone.Load()
EbpfTracerTelemetry.lastDoubleFlushAttemptsDone.Store(int64(ebpfTelemetry.Double_flush_attempts_done))
ch <- prometheus.MustNewConstMetric(EbpfTracerTelemetry.doubleFlushAttemptsDone, prometheus.CounterValue, float64(delta))

delta = int64(ebpfTelemetry.Unsupported_tcp_failures) - EbpfTracerTelemetry.lastUnsupportedTcpFailures.Load()
EbpfTracerTelemetry.lastUnsupportedTcpFailures.Store(int64(ebpfTelemetry.Unsupported_tcp_failures))
ch <- prometheus.MustNewConstMetric(EbpfTracerTelemetry.unsupportedTcpFailures, prometheus.CounterValue, float64(delta))
Expand Down
Loading