Sneak peek: LBR based stacks in tracing spans for failed syscalls through ebpf_exporter.

Think "retsnoop, but more structured". It be attached to existing traces too.

Also pictured: SRSO sadness.

#ebpf #kernel #ebpf_exporter

It's been too long since the last ebpf_exporter release, so I cut v2.5.0 today.

https://github.com/cloudflare/ebpf_exporter/releases/tag/v2.5.0

#ebpf_exporter #ebpf #bpf #linux #kernel

Have you ever though "boy I love distributed tracing, but I wish I could add kernel produced spans to my traces"?

Well, now you can! I just published ebpf_exporter v2.4.0 and it can now create kernel spans that are integrated in your normal traces.

See: https://github.com/cloudflare/ebpf_exporter/releases/tag/v2.4.0

The most interesting example is producing network related spans, like TCP retransmits or SKB drops. Here's a screenshot of a whole bunch of them attached to a userspace trace.

#ebpf #ebpf_exporter #kernel

Release v2.4.0 / 2024-02-27 Β· cloudflare/ebpf_exporter

This is a big release that comes with a major new feature: Distributed Tracing via OpenTelemetry (#297). You can find the full documentation in ./tracing. As a quick demo, you could run a demo loca...

GitHub

It's been a while since the last ebpf_exporter release, so I cut a new one just now. Lots of changes in v2.3.0.

You can now start testing with just docker:

```
docker run --rm -it --privileged -p 9435:9435 ghcr.io/cloudflare/ebpf_exporter:v2.3.0 --config.dir=examples --config.names=timers
```

* https://github.com/cloudflare/ebpf_exporter/releases/tag/v2.3.0

#ebpf #ebpf_exporter #kernel #linux

Release v2.3.0 / 2023-12-26 Β· cloudflare/ebpf_exporter

Highlights: Added support for fanotify for a faster and more reliable cgroup monitoring (#244, #263, #264, #265, #266, #279, #288) Added builds with built-in libbpf (now preferred) and system prov...

GitHub

Empty ebpf getpid() tracepoint overhead: 15ns 🏎️, fentry is 24ns πŸš—

Empty ebpf uprobe overhead: 1600ns 🐌

Benchmark: https://github.com/cloudflare/ebpf_exporter/pull/331

Is there a better way if I want arbitrary userspace programs to pass something to my ebpf code? Giving a ringbuf fd via some library seems convoluted.

#ebpf #ebpf_exporter

Add uprobe benchmark by bobrik Β· Pull Request #331 Β· cloudflare/ebpf_exporter

Prometheus exporter for custom eBPF metrics. Contribute to cloudflare/ebpf_exporter development by creating an account on GitHub.

GitHub

New cool example for ebpf_exporter: CFS delay histogram. In addition to knowing overall CFS throttlig delay from cgroups in cpu.state, now you can have a histogram of individual throttling durations in prometheus.

* https://github.com/cloudflare/ebpf_exporter/pull/311

As a bonus, you get a bpftrace command to observe these.

#ebpf #ebpf_exporter #cgroups #cfs #bpftrace #prometheus

Add cfs-throttling example by bobrik Β· Pull Request #311 Β· cloudflare/ebpf_exporter

Example throttled program: ivan@vm:~$ sudo systemd-run --pty --quiet --collect --unit stress-ng.service --property CPUQuota=8% stress-ng --cpu 1 stress-ng: info: [70953] defaulting to a 86400 seco...

GitHub

I hacked together opentelemetry distributed tracing support for ebpf_exporter: https://github.com/cloudflare/ebpf_exporter/pull/297

So far I managed to add some block i/o tracing via tracepoints, but it's unclear how to tie this together to userspace traces, since there's no way for userspace to pass the trace id.

Are there any other kernel areas that people are interested in having integrated with distributed tracing? Sockets? Scheduling? Something else?

#ebpf_exporter #ebpf #kernel #opentelemetry #otel #otlp

Add support for opentelemetry tracing by bobrik Β· Pull Request #297 Β· cloudflare/ebpf_exporter

Example trace: To produce it: Run jaeger: docker run --rm -it --net host jaegertracing/all-in-one:1.50 Run ebpf_exporter: make && make -C examples && sudo ./ebpf_exporter --config.dir=example...

GitHub

ebpf_exporter now comes with a docker image with examples if you couldn't be bothered to build it yourself:

* https://github.com/cloudflare/ebpf_exporter/pkgs/container/ebpf_exporter

docker run --rm -it --privileged -p 9435:9435 ghcr.io/cloudflare/ebpf_exporter:master --config.dir=examples --config.names=timers

#ebpf #ebpf_exporter

Build software better, together

GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

GitHub