alloy
alloy copied to clipboard
pyroscope.ebpf: otel profiler implementation
PR Description
This PR changes the implementation of pyroscope.ebpf compoenent from grafana/pyroscope/ebpf to opentelemetry-ebpf-profiler - a fork of opentelemetry-ebpf-profiler.
The notable changes of the fork: native frame symbolization, dynamic profiling policy, target discovery labels.
The fork uses a rust library for symbol extraction. See https://github.com/open-telemetry/opentelemetry-ebpf-profiler/tree/main/rust-crates.
In this PR I put all pyroscope.ebpf code behind a pyroscope_ebpf go tag, so that it is not compiled by default and does not require to compile and link libsymblib_capi.a. I've added some link directives that links to target/x86_64-unknown-linux-musl/release/libsymblib_capi.a automatically so that no linker flags are needed from the user. This autolinking can be disabled with another go tag flag pyroscope_ebpf_no_link. Then you can link the lib any other way, for example CGO_LDFLAGS=./libsymblib_capi.a
Some component arguments became no-op as there are no corresponding knobs in the new implementations. These args a deprecated
// deprecated
PidCacheSize int `alloy:"pid_cache_size,attr,optional"`
// deprecated
BuildIDCacheSize int `alloy:"build_id_cache_size,attr,optional"`
// deprecated
SameFileCacheSize int `alloy:"same_file_cache_size,attr,optional"`
// deprecated
CacheRounds int `alloy:"cache_rounds,attr,optional"`
// deprecated
GoTableFallback bool `alloy:"go_table_fallback,attr,optional"`
// deprecated
SymbolsMapSize int `alloy:"symbols_map_size,attr,optional"`
Which issue(s) this PR fixes
Notes to the Reviewer
PR Checklist
- [x] CHANGELOG.md updated
- [x] Documentation added
- [x] Tests updated
- [ ] Config converters updated
:computer: Deploy preview deleted.
Found some python issues, currently working on them now https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/414 https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/412
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Hello guys, thanks for the good work! I'm really looking forward for the implementation of otel ebpf profiler Alloy, do we have an estimate on when this could be released? thanks !
We found multiple bugs in python. We will merge the PR when we fix bugs and can dogfood python workloads and grafana labs.
I am more or less happy with the way it runs. I do not expect much changes both in alloy and profiler. The CI is red. I need to update otel to 128 I started with https://github.com/grafana/beyla/pull/2052 Will continue with the alloy on Monday