pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

Experimental: Adds a Github Integration to fetch profiled code

Open cyriltovena opened this issue 1 year ago • 5 comments

This adds a set of API that allows users to connect their Pyroscope to Github and fetch profiling code for future mapping with profiling data.

Right now this is a big focus on Github and go but in the future we can expand to other VCS or language.

For go the API allows to fetch code for go modules (vendor or not), go standard library and main application code.

The API requires to provide:

  • Git repository for the main application
  • The git ref
  • The local path received from the pprof profile API

The PR contains a html page for testing purpose and will be removed prior merging.

### Remaining Tasks
- [x] Figure how to correctly delete a client cookie using connect-go
- [x] Refactor the code into a better structure.
- [x] Better tests for now this is very basic test that allowed me to build everything but we need more mocking instead of calling real http endpoint.
- [x] Documentation and design document on how this works.
image

cc @bryanhuhta @grafakus

cyriltovena avatar Jan 25 '24 17:01 cyriltovena

Great idea! Will we need some doc to help people configure this?

knylander-grafana avatar Jan 29 '24 18:01 knylander-grafana

Great idea! Will we need some doc to help people configure this?

@knylander-grafana Eventually we will! Right now we need to focus on polish and some integration details. At this point we have a pretty good idea how it will all work, but let's delay getting docs started until we do more polish and can be more confident on how this feature should be configured by the users.

bryanhuhta avatar Jan 31 '24 16:01 bryanhuhta

Some update for our community this is how it looks right now.

image

cyriltovena avatar Jan 31 '24 22:01 cyriltovena

This is shaping up nicely

image

cyriltovena avatar Feb 02 '24 22:02 cyriltovena

Adding one more image to use github as a CDN

image

cyriltovena avatar Feb 12 '24 13:02 cyriltovena