-
Notifications
You must be signed in to change notification settings - Fork 716
parca debug-info upload #4648
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
base: main
Are you sure you want to change the base?
parca debug-info upload #4648
Conversation
d202551 to
8577f33
Compare
8577f33 to
5c053a7
Compare
Co-Authored-By: Claude Opus 4.5 <[email protected]>
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( |
There was a problem hiding this comment.
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?
| //case debuginfopb.DebuginfoUpload_STATE_PURGED: | ||
| // // Debuginfo was purged, allow re-uploading | ||
| // return &debuginfopb.ShouldInitiateUploadResponse{ | ||
| // ShouldInitiateUpload: true, | ||
| // Reason: ReasonDebuginfoPurged, | ||
| // }, nil |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
Co-authored-by: Marc Sanmiquel <[email protected]>
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
debuginfouploads 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.