Skip to content

Commit 0a749ff

Browse files
fix: Remove Parca debug info upload from user configuration (#5391)
1 parent 4d12f24 commit 0a749ff

File tree

6 files changed

+15
-59
lines changed

6 files changed

+15
-59
lines changed

docs/sources/reference/components/pyroscope/pyroscope.ebpf.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -87,32 +87,7 @@ Several arguments are marked as "Deprecated (no-op)". These arguments were previ
8787

8888
## Blocks
8989

90-
You can use the following blocks with `pyroscope.ebpf`:
91-
92-
| Hierarchy | Block | Description | Required |
93-
|--------------|--------------|---------------------------------------------------------|----------|
94-
| `debug_info` | [debug_info] | Configures debug information handling and remote upload. | no |
95-
96-
[debug_info]: #debug_info
97-
98-
### debug_info
99-
100-
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.
101-
102-
You can use the following arguments with the `debug_info` block:
103-
104-
| Name | Type | Description | Default | Required |
105-
|---------------------------|--------|------------------------------------------------------------------------|---------|----------|
106-
| `on_target_symbolization` | `bool` | Enables on-target symbolization using local debug information. | `true` | no |
107-
| `upload` | `bool` | Enables uploading debug information to the remote endpoint. | `false` | no |
108-
| `cache_size` | `int` | Size of the LRU cache for tracking uploaded debug information. | `65536` | no |
109-
| `strip_text_section` | `bool` | Strips the `.text` section from debug information before upload. | `false` | no |
110-
| `queue_size` | `int` | Size of the upload queue. | `1024` | no |
111-
| `worker_num` | `int` | Number of worker goroutines for uploading debug information. | `8` | no |
112-
113-
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.
114-
115-
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.
90+
`pyroscope.ebpf` doesn't support any blocks.
11691

11792
## Exported fields
11893

internal/component/pyroscope/ebpf/args.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/grafana/alloy/internal/component/discovery"
77
"github.com/grafana/alloy/internal/component/pyroscope"
8-
"github.com/grafana/alloy/internal/component/pyroscope/write/debuginfo"
98
)
109

1110
type Arguments struct {
@@ -29,8 +28,6 @@ type Arguments struct {
2928
LazyMode bool `alloy:"lazy_mode,attr,optional"`
3029
DeprecatedArguments DeprecatedArguments `alloy:",squash"`
3130

32-
DebugInfoOptions debuginfo.Arguments `alloy:"debug_info,block,optional"`
33-
3431
// undocumented
3532
PyroscopeDynamicProfilingPolicy bool `alloy:"targets_only,attr,optional"`
3633
SymbCachePath string `alloy:"symb_cache_path,attr,optional"`

internal/component/pyroscope/ebpf/ebpf_linux.go

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,17 @@ func New(logger log.Logger, reg prometheus.Registerer, id string, args Arguments
6767

6868
appendable := pyroscope.NewFanout(args.ForwardTo, id, reg)
6969

70-
var nfs *irsymcache.Resolver
71-
if args.DebugInfoOptions.OnTargetSymbolizationEnabled {
72-
nfs, err = irsymcache.NewFSCache(logger, irsymcache.TableTableFactory{
73-
Options: []lidia.Option{
74-
lidia.WithFiles(),
75-
lidia.WithLines(),
76-
},
77-
}, irsymcache.Options{
78-
SizeEntries: uint32(args.SymbCacheSizeEntries),
79-
Path: args.SymbCachePath,
80-
})
81-
if err != nil {
82-
return nil, err
83-
}
70+
nfs, err := irsymcache.NewFSCache(logger, irsymcache.TableTableFactory{
71+
Options: []lidia.Option{
72+
lidia.WithFiles(),
73+
lidia.WithLines(),
74+
},
75+
}, irsymcache.Options{
76+
SizeEntries: uint32(args.SymbCacheSizeEntries),
77+
Path: args.SymbCachePath,
78+
})
79+
if err != nil {
80+
return nil, err
8481
}
8582

8683
if dynamicProfilingPolicy {
@@ -282,11 +279,9 @@ func (c *Component) ReportExecutable(md *reporter2.ExecutableMetadata) {
282279
if c.symbols != nil {
283280
c.symbols.ReportExecutable(md)
284281
}
285-
if c.args.DebugInfoOptions.UploadEnabled {
286-
c.reportExecutableForDebugInfoUpload(md)
287-
}
288282
}
289283

284+
//nolint:unused
290285
func (c *Component) reportExecutableForDebugInfoUpload(args *reporter2.ExecutableMetadata) {
291286
extractAsFile := func(pid libpf.PID, file string) string {
292287
return path.Join("/proc", strconv.Itoa(int(pid)), "root", file)
@@ -309,7 +304,6 @@ func (c *Component) reportExecutableForDebugInfoUpload(args *reporter2.Executabl
309304
c.appendable.Upload(debuginfo.UploadJob{
310305
FrameMappingFileData: mf,
311306
Open: open,
312-
InitArguments: c.args.DebugInfoOptions,
313307
})
314308
}
315309

@@ -333,15 +327,6 @@ func NewDefaultArguments() Arguments {
333327
VerboseMode: false,
334328
LazyMode: false,
335329

336-
DebugInfoOptions: debuginfo.Arguments{
337-
OnTargetSymbolizationEnabled: true,
338-
UploadEnabled: false,
339-
CacheSize: 65536,
340-
StripTextSection: false,
341-
QueueSize: 1024,
342-
WorkerNum: 8,
343-
},
344-
345330
// undocumented
346331
PyroscopeDynamicProfilingPolicy: true,
347332
SymbCachePath: "/tmp/symb-cache",

internal/component/pyroscope/receive_http/debuginfo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515

1616
var errNoDebugInfoClient = status.Error(codes.Unavailable, "no debug info client available")
1717

18+
//nolint:unused
1819
func (c *Component) mountDebugInfo(router *mux.Router) {
1920
c.grpcServer = NewGrpcServer(c.server.Config())
2021
debuginfogrpc.RegisterDebuginfoServiceServer(c.grpcServer, c)

internal/component/pyroscope/receive_http/receive_http.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ func (c *Component) update(args component.Arguments) (bool, error) {
147147
// mount connect go pushv1
148148
pathPush, handlePush := pushv1connect.NewPusherServiceHandler(c)
149149
router.PathPrefix(pathPush).Handler(handlePush).Methods(http.MethodPost)
150-
151-
c.mountDebugInfo(router)
152150
})
153151
}
154152

internal/component/pyroscope/util/internal/cmd/playground/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func newEbpf(forward pyroscope.Appendable, uprobeLinks []string) *ebpf.Component
5656
args.ReporterUnsymbolizedStubs = true
5757
args.Demangle = "full"
5858
args.UProbeLinks = uprobeLinks
59-
args.DebugInfoOptions.UploadEnabled = true
59+
// args.DebugInfoOptions.UploadEnabled = true
6060
e, err := ebpf.New(
6161
log.With(l, "component", "ebpf"),
6262
reg,

0 commit comments

Comments
 (0)