Skip to content

Commit

Permalink
Add amd64-specific build tag for eBPF integration (grafana#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaschalis committed Apr 28, 2022
1 parent 8ca7dca commit 9f03dcf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/developer/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The Makefile provides several targets:
Compiling the Agent on Linux requires a couple of extra dependencies.
These are
* [systemd headers](https://github.com/grafana/agent/blob/main/cmd/agent/Dockerfile#L8-L9) for Promtail
* [bcc tools](https://github.com/grafana/agent/blob/main/cmd/agent/Dockerfile#L12-L13) for the eBPF integration
* [bcc tools](https://github.com/grafana/agent/blob/main/cmd/agent/Dockerfile#L12-L13) for the eBPF integration on AMD64 systems

If you have issues installing the bcc tooling, you can use `-tags=noebpf` to compile the Agent without the eBPF integration.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ It is an embedded version of
that allows the Agent to attach eBPF programs to the host kernel
and export defined metrics in a Prometheus-compatible format.

As such, this integration comes with the relevant caveats of
running eBPF programs on your host, like being on a kernel
version >4.1, specific kernel flags being enabled, plus
superuser access is most usually required.
As such, this integration is only supported on Linux/AMD64, and
it comes with the relevant caveats of running eBPF programs
on your host, like being on a kernel version >4.1, specific
kernel flags being enabled, plus having superuser access.

Currently, the exporter only supports `kprobes`, that is
kernel-space probes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/integrations/v2/ebpf/integration.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux && !noebpf
// +build linux,!noebpf
//go:build linux && amd64 && !noebpf
// +build linux,amd64,!noebpf

package ebpf

Expand Down
4 changes: 2 additions & 2 deletions pkg/integrations/v2/ebpf/integration_stub.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !linux || noebpf
// +build !linux noebpf
//go:build !linux || !amd64 || noebpf
// +build !linux !amd64 noebpf

package ebpf

Expand Down

0 comments on commit 9f03dcf

Please sign in to comment.