-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[pprofreceiver] add file scraper to read pprof files #45411
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?
Conversation
Signed-off-by: Florian Lehner <[email protected]>
| go.opentelemetry.io/collector/receiver/xreceiver v0.143.1-0.20260109195331-fbd5d3f9faae | ||
| go.opentelemetry.io/collector/scraper v0.143.0 | ||
| go.opentelemetry.io/collector/scraper/scraperhelper v0.143.1-0.20260113235037-cac5574b46c0 | ||
| go.opentelemetry.io/collector/scraper/scraperhelper/xscraperhelper v0.0.0-20260113235037-cac5574b46c0 |
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.
xscraperhelper was just merged and is not part yet of a released version. Therefore latest current commit on main was used.
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.
You'll want to use the same core version as other packages (v0.143.1-0.20260109195331-fbd5d3f9faae) for these few ones
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 guess, I will wait with an update for next week when there is a new release. With the new release I don't require to touch other packages and increase complexity of this change.
Signed-off-by: Florian Lehner <[email protected]>
| } | ||
|
|
||
| func (s *pprofScraper) scrape(_ context.Context) (pprofile.Profiles, error) { | ||
| matches, err := doublestar.FilepathGlob(s.config.Include) |
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.
please add a test with a simple pprof test file so we can ensure the code can read and interpret to pprofile. The assertion on the pprofile data can be as simple as checking one profile is present - we're just interested in finding if this method runs ok.
| scraperhelper.ControllerConfig `mapstructure:",squash"` | ||
|
|
||
| // Include is the glob pattern for pprof files to scrape. | ||
| Include string `mapstructure:"include"` |
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.
Please add to README config?
|
|
||
| // Config defines the configuration for the pprof receiver. | ||
| type Config struct { | ||
| confighttp.ClientConfig `mapstructure:",squash"` |
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 still want to be able to open a port and receive pprof profile data over HTTP - see #44385
Description
Follow up to #44357
Implement the functionality of transforming pprof to OTel Profiles
FYI: @open-telemetry/profiling-approvers
Link to tracking issue
Fixes
Testing
Documentation