-
Notifications
You must be signed in to change notification settings - Fork 302
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
Can't import go.opentelemetry.io/ebpf-profiler/libpf with CGO_ENABLED=false #331
Comments
Just some background information: At the moment, the source of truth around frame types is in the eBPF part: opentelemetry-ebpf-profiler/support/ebpf/frametypes.h Lines 14 to 35 in de19b87
These C/eBPF constants and types are made available to the user space part/Go via package opentelemetry-ebpf-profiler/support/types.go Lines 14 to 28 in de19b87
So in general package |
The good news is that the @dmathieu if we continue with the CGO requirement, what are the implications of not having the exporter available in contrib? |
It won't be included in the default collector distributions |
But those distributions will also not be able to include the profiling agent functionality which depends on CGO, which essentially reduces down to distributions that want to export profiling data to ES that's coming in over OTLP (not captured by same collector distribution). That sounds like a common deployment scenario (edge collectors with direct profile capture that send profiling data to centralized collectors without direct profile capture capability) that we'd want to support. |
With the architecture where a collector runs as a daemonset with the profiling agent, and sends the data using OTLP to a cluster-wide collector. Then, this collector receives the data and uses the ES exporter. The need for this issue comes from this PR: I'll look into removing libpf from that exporter. |
With #332 I have opened a draft for a possible solution. The cgo part will be moved to the go generate stage before building. And so the package |
I need to import
go.opentelemetry.io/ebpf-profiler/libpf
withCGO_ENABLED=0
(in the context of a collector-contrib exporter).However, the frametype file defines constants from the
go.opentelemetry.io/ebpf-profiler/support
package, which relies on CGO.opentelemetry-ebpf-profiler/libpf/frametype.go
Lines 28 to 54 in de19b87
Could we either not rely on
support
, or move those constants into another package?libpf has a lot of utility structs (such as FrameID or FileID) that make it hard not to rely on it when manipulating data that comes from profiles.
The text was updated successfully, but these errors were encountered: