Skip to content

Conversation

@florianl
Copy link
Contributor

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

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
Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

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)
Copy link
Contributor

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"`
Copy link
Contributor

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"`
Copy link
Contributor

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

@atoulme atoulme changed the title [pprofreceiver] implement functionality [pprofreceiver] add file scraper to read pprof files Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants