Skip to content

Conversation

@korniltsev-grafanista
Copy link
Contributor

@korniltsev-grafanista korniltsev-grafanista commented Nov 28, 2025

This PR copies the code from https://github.com/parca-dev/parca/tree/main/pkg/debuginfo into pyroscope and integrates with the existing distributors and symbolizer

The parca's debuginfo uploads debug info binaries to a separate bucket subdir.
The symbolizer later uses the new subdir as the source for debug info binaries as an alternative to debuginfod.

@korniltsev-grafanista korniltsev-grafanista force-pushed the debuginfo-upload branch 5 times, most recently from d202551 to 8577f33 Compare January 16, 2026 07:36
@korniltsev-grafanista korniltsev-grafanista changed the title WIP parca debug-info upload parca debug-info upload Jan 16, 2026
@korniltsev-grafanista korniltsev-grafanista marked this pull request as ready for review January 16, 2026 08:05
korniltsev-grafanista and others added 5 commits January 19, 2026 05:45
Add debug-level logging to help troubleshoot debuginfo upload issues:
- Log ShouldInitiateUpload results (build_id, decision, reason)
- Log Upload gRPC results (success with size, or failure with error)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Debuginfod fetching is now handled in the symbolizer instead of in the
parca debuginfo store. This removes the debuginfod client implementation,
related tests, and test fixtures from the parca/debuginfo package.

Also removes tenant ID handling from the debuginfo store since it's not
needed for this use case.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…test

Refactor the store test to use an HTTP/2 server with h2c and the
util.AuthenticateUser middleware instead of a direct gRPC server.
This better reflects the production setup where requests go through
HTTP middleware for tenant authentication.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
span.SetAttributes(attribute.String("upload_id", uploadID))

if err := s.upload(ctx, buildID, uploadID, typ, r); err != nil {
level.Debug(s.logger).Log(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be level.Error?

Comment on lines +225 to +230
//case debuginfopb.DebuginfoUpload_STATE_PURGED:
// // Debuginfo was purged, allow re-uploading
// return &debuginfopb.ShouldInitiateUploadResponse{
// ShouldInitiateUpload: true,
// Reason: ReasonDebuginfoPurged,
// }, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 ?

}

func (s *Symbolizer) fetch(ctx context.Context, buildID string) (io.ReadCloser, error) {
if r, err := s.fetchFromParca(ctx, buildID); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think is worth considering adding a background job to pre-convert uploaded debug info to Lidia format right after upload so the first symbolization request would be faster? Maybe it's just a premature optimization


t := noop.Tracer{}
l = log.With(l, "component", "debug-info")
bucket = objstore.NewPrefixedBucket(bucket, symbolizer.BucketPrefixParcaDebugInfo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't have a cleanup mechanism to control unbounded growth (neither for symbolizer path). Could it be an issue?

func (c *LRUCache[K, V]) Get(key K) (V, bool) {
c.mtx.RLock()
defer c.mtx.RUnlock()
return c.lru.Get(key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be a race? I think .Get modifies internal state with MoveToFront while using a RLock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants