Skip to content

Commit

Permalink
Introduce option for high volume request tracking (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelroquetto authored Sep 24, 2024
1 parent c3901b2 commit 926af81
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 27 deletions.
3 changes: 3 additions & 0 deletions bpf/k_tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ int BPF_KRETPROBE(kretprobe_tcp_sendmsg, int sent_len) {
}

static __always_inline void ensure_sent_event(u64 id, u64 *sock_p) {
if (high_request_volume) {
return;
}
send_args_t *s_args = bpf_map_lookup_elem(&active_send_args, &id);
if (s_args) {
bpf_dbg_printk("Checking if we need to finish the request per thread id");
Expand Down
3 changes: 3 additions & 0 deletions bpf/protocol_http.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ get_or_set_http_info(http_info_t *info, pid_connection_info_t *pid_conn, u8 pack
}

static __always_inline void finish_possible_delayed_http_request(pid_connection_info_t *pid_conn) {
if (high_request_volume) {
return;
}
http_info_t *info = bpf_map_lookup_elem(&ongoing_http, pid_conn);
if (info) {
finish_http(info, pid_conn);
Expand Down
2 changes: 1 addition & 1 deletion charts/beyla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ eBPF-based autoinstrumentation HTTP, HTTP2 and gRPC services, as well as network
|-----|------|---------|-------------|
| affinity | object | `{}` | used for scheduling of pods based on affinity rules |
| config.create | bool | `true` | set to true, to use the below default configurations |
| config.data | object | `{"attributes":{"kubernetes":{"enable":true},"select":{"beyla_network_flow_bytes":{"include":["k8s.src.owner.type","k8s.dst.owner.type","direction"]}}},"filter":{"network":{"k8s_dst_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"},"k8s_src_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"}}},"prometheus_export":{"path":"/metrics","port":9090}}` | default value of beyla configuration |
| config.data | object | `{"attributes":{"kubernetes":{"enable":true},"select":{"beyla_network_flow_bytes":{"include":["k8s.src.owner.type","k8s.dst.owner.type","direction"]}}},"filter":{"application":{"client":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"},"server":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"}},"network":{"k8s_dst_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"},"k8s_src_owner_name":{"not_match":"{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}"}}},"prometheus_export":{"path":"/metrics","port":9090}}` | default value of beyla configuration |
| config.name | string | `""` | |
| dnsPolicy | string | `"ClusterFirstWithHostNet"` | Determines how DNS resolution is handled for that pod. If `.Values.preset` is set to `network` or `.Values.config.data.network` is enabled, Beyla requires `hostNetwork` access, causing cluster service DNS resolution to fail. It is recommended not to change this if Beyla sends traces and metrics to Grafana components via k8s service. |
| env | object | `{}` | extra environment variables |
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o
Git LFS file not shown
2 changes: 1 addition & 1 deletion pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_debug_arm64_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_debug_x86_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_tp_arm64_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_tp_debug_x86_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o
Git LFS file not shown
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o
Git LFS file not shown

0 comments on commit 926af81

Please sign in to comment.