From 7d2a1a47f999c046e6b5060622ed49f3aa0e93af Mon Sep 17 00:00:00 2001 From: Tolya Korniltsev Date: Thu, 29 Jan 2026 16:23:12 +0700 Subject: [PATCH] fix: Remove Parca debug info upload from user configuration Remove the debug_info block from pyroscope.ebpf component arguments, hiding the Parca debug info upload functionality from users. On-target symbolization is now always enabled internally. Changes: - Remove debug_info block from pyroscope.ebpf arguments - Remove debug info endpoint handling from pyroscope.receive_http - Update documentation to reflect removed configuration options - Keep internal upload code for potential future use Co-Authored-By: Claude Opus 4.5 --- .../components/pyroscope/pyroscope.ebpf.md | 27 +------------ internal/component/pyroscope/ebpf/args.go | 3 -- .../component/pyroscope/ebpf/ebpf_linux.go | 39 ++++++------------- .../pyroscope/receive_http/debuginfo.go | 1 + .../pyroscope/receive_http/receive_http.go | 2 - .../util/internal/cmd/playground/main.go | 2 +- 6 files changed, 15 insertions(+), 59 deletions(-) diff --git a/docs/sources/reference/components/pyroscope/pyroscope.ebpf.md b/docs/sources/reference/components/pyroscope/pyroscope.ebpf.md index 7187e53ef0d..62054d1408d 100644 --- a/docs/sources/reference/components/pyroscope/pyroscope.ebpf.md +++ b/docs/sources/reference/components/pyroscope/pyroscope.ebpf.md @@ -87,32 +87,7 @@ Several arguments are marked as "Deprecated (no-op)". These arguments were previ ## Blocks -You can use the following blocks with `pyroscope.ebpf`: - -| Hierarchy | Block | Description | Required | -|--------------|--------------|---------------------------------------------------------|----------| -| `debug_info` | [debug_info] | Configures debug information handling and remote upload. | no | - -[debug_info]: #debug_info - -### debug_info - -The `debug_info` block configures how the component handles debug information for symbolization. You can use it to enable on-target symbolization, which resolves symbols locally, or to upload debug information to a remote endpoint for server-side symbolization. - -You can use the following arguments with the `debug_info` block: - -| Name | Type | Description | Default | Required | -|---------------------------|--------|------------------------------------------------------------------------|---------|----------| -| `on_target_symbolization` | `bool` | Enables on-target symbolization using local debug information. | `true` | no | -| `upload` | `bool` | Enables uploading debug information to the remote endpoint. | `false` | no | -| `cache_size` | `int` | Size of the LRU cache for tracking uploaded debug information. | `65536` | no | -| `strip_text_section` | `bool` | Strips the `.text` section from debug information before upload. | `false` | no | -| `queue_size` | `int` | Size of the upload queue. | `1024` | no | -| `worker_num` | `int` | Number of worker goroutines for uploading debug information. | `8` | no | - -When `on_target_symbolization` is enabled, the component resolves symbols locally using debug files found on the host. This is the default behavior and works well when debug symbols are available on the profiled system. - -When `upload` is enabled, the component uploads debug information to the configured `pyroscope.write` endpoint, allowing the server to perform symbolization instead. This reduces CPU and memory usage on the profiled host, which is useful in resource-constrained environments. +`pyroscope.ebpf` doesn't support any blocks. ## Exported fields diff --git a/internal/component/pyroscope/ebpf/args.go b/internal/component/pyroscope/ebpf/args.go index fffc86cc187..2ca0ee4b465 100644 --- a/internal/component/pyroscope/ebpf/args.go +++ b/internal/component/pyroscope/ebpf/args.go @@ -5,7 +5,6 @@ import ( "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/pyroscope" - "github.com/grafana/alloy/internal/component/pyroscope/write/debuginfo" ) type Arguments struct { @@ -29,8 +28,6 @@ type Arguments struct { LazyMode bool `alloy:"lazy_mode,attr,optional"` DeprecatedArguments DeprecatedArguments `alloy:",squash"` - DebugInfoOptions debuginfo.Arguments `alloy:"debug_info,block,optional"` - // undocumented PyroscopeDynamicProfilingPolicy bool `alloy:"targets_only,attr,optional"` SymbCachePath string `alloy:"symb_cache_path,attr,optional"` diff --git a/internal/component/pyroscope/ebpf/ebpf_linux.go b/internal/component/pyroscope/ebpf/ebpf_linux.go index 77807b93619..1b367e7f2b0 100644 --- a/internal/component/pyroscope/ebpf/ebpf_linux.go +++ b/internal/component/pyroscope/ebpf/ebpf_linux.go @@ -67,20 +67,17 @@ func New(logger log.Logger, reg prometheus.Registerer, id string, args Arguments appendable := pyroscope.NewFanout(args.ForwardTo, id, reg) - var nfs *irsymcache.Resolver - if args.DebugInfoOptions.OnTargetSymbolizationEnabled { - nfs, err = irsymcache.NewFSCache(logger, irsymcache.TableTableFactory{ - Options: []lidia.Option{ - lidia.WithFiles(), - lidia.WithLines(), - }, - }, irsymcache.Options{ - SizeEntries: uint32(args.SymbCacheSizeEntries), - Path: args.SymbCachePath, - }) - if err != nil { - return nil, err - } + nfs, err := irsymcache.NewFSCache(logger, irsymcache.TableTableFactory{ + Options: []lidia.Option{ + lidia.WithFiles(), + lidia.WithLines(), + }, + }, irsymcache.Options{ + SizeEntries: uint32(args.SymbCacheSizeEntries), + Path: args.SymbCachePath, + }) + if err != nil { + return nil, err } if dynamicProfilingPolicy { @@ -282,11 +279,9 @@ func (c *Component) ReportExecutable(md *reporter2.ExecutableMetadata) { if c.symbols != nil { c.symbols.ReportExecutable(md) } - if c.args.DebugInfoOptions.UploadEnabled { - c.reportExecutableForDebugInfoUpload(md) - } } +//nolint:unused func (c *Component) reportExecutableForDebugInfoUpload(args *reporter2.ExecutableMetadata) { extractAsFile := func(pid libpf.PID, file string) string { return path.Join("/proc", strconv.Itoa(int(pid)), "root", file) @@ -309,7 +304,6 @@ func (c *Component) reportExecutableForDebugInfoUpload(args *reporter2.Executabl c.appendable.Upload(debuginfo.UploadJob{ FrameMappingFileData: mf, Open: open, - InitArguments: c.args.DebugInfoOptions, }) } @@ -333,15 +327,6 @@ func NewDefaultArguments() Arguments { VerboseMode: false, LazyMode: false, - DebugInfoOptions: debuginfo.Arguments{ - OnTargetSymbolizationEnabled: true, - UploadEnabled: false, - CacheSize: 65536, - StripTextSection: false, - QueueSize: 1024, - WorkerNum: 8, - }, - // undocumented PyroscopeDynamicProfilingPolicy: true, SymbCachePath: "/tmp/symb-cache", diff --git a/internal/component/pyroscope/receive_http/debuginfo.go b/internal/component/pyroscope/receive_http/debuginfo.go index 0cf6b15fbca..44b8dce517e 100644 --- a/internal/component/pyroscope/receive_http/debuginfo.go +++ b/internal/component/pyroscope/receive_http/debuginfo.go @@ -15,6 +15,7 @@ import ( var errNoDebugInfoClient = status.Error(codes.Unavailable, "no debug info client available") +//nolint:unused func (c *Component) mountDebugInfo(router *mux.Router) { c.grpcServer = NewGrpcServer(c.server.Config()) debuginfogrpc.RegisterDebuginfoServiceServer(c.grpcServer, c) diff --git a/internal/component/pyroscope/receive_http/receive_http.go b/internal/component/pyroscope/receive_http/receive_http.go index 59a5def9c12..237283de489 100644 --- a/internal/component/pyroscope/receive_http/receive_http.go +++ b/internal/component/pyroscope/receive_http/receive_http.go @@ -147,8 +147,6 @@ func (c *Component) update(args component.Arguments) (bool, error) { // mount connect go pushv1 pathPush, handlePush := pushv1connect.NewPusherServiceHandler(c) router.PathPrefix(pathPush).Handler(handlePush).Methods(http.MethodPost) - - c.mountDebugInfo(router) }) } diff --git a/internal/component/pyroscope/util/internal/cmd/playground/main.go b/internal/component/pyroscope/util/internal/cmd/playground/main.go index 989b67afef9..9f47c5b7ebe 100644 --- a/internal/component/pyroscope/util/internal/cmd/playground/main.go +++ b/internal/component/pyroscope/util/internal/cmd/playground/main.go @@ -56,7 +56,7 @@ func newEbpf(forward pyroscope.Appendable, uprobeLinks []string) *ebpf.Component args.ReporterUnsymbolizedStubs = true args.Demangle = "full" args.UProbeLinks = uprobeLinks - args.DebugInfoOptions.UploadEnabled = true + // args.DebugInfoOptions.UploadEnabled = true e, err := ebpf.New( log.With(l, "component", "ebpf"), reg,