Skip to content
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

Experimental: Adds a Github Integration to fetch profiled code #2965

Merged
merged 39 commits into from
Feb 19, 2024

Conversation

cyriltovena
Copy link
Contributor

@cyriltovena cyriltovena commented Jan 25, 2024

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

Preview Give feedback
image

cc @bryanhuhta @grafakus

Copy link
Contributor

@bryanhuhta bryanhuhta left a comment

Choose a reason for hiding this comment

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

This will be a killer feature once it gets some polish 🥇

api/vcs/v1/vcs.proto Outdated Show resolved Hide resolved
pkg/api/vcs.html Outdated Show resolved Hide resolved
pkg/querier/vcs.go Outdated Show resolved Hide resolved
pkg/querier/vcs.go Outdated Show resolved Hide resolved
pkg/querier/vcs.go Outdated Show resolved Hide resolved
@knylander-grafana
Copy link
Contributor

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

@bryanhuhta
Copy link
Contributor

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.

@cyriltovena
Copy link
Contributor Author

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

image

@cyriltovena
Copy link
Contributor Author

This is shaping up nicely

image

@cyriltovena cyriltovena marked this pull request as ready for review February 9, 2024 10:18
@cyriltovena cyriltovena requested review from korniltsev and a team as code owners February 9, 2024 10:18
@cyriltovena
Copy link
Contributor Author

Adding one more image to use github as a CDN

image

Copy link
Contributor

@bryanhuhta bryanhuhta left a comment

Choose a reason for hiding this comment

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

Looks good! A few small remarks but nothing blocking.

pkg/querier/vcs/source/find.go Outdated Show resolved Hide resolved
pkg/querier/vcs/source/golang/modules.go Outdated Show resolved Hide resolved
pkg/querier/vcs/client/github.go Outdated Show resolved Hide resolved
pkg/querier/vcs/client/github.go Show resolved Hide resolved
pkg/querier/vcs/source/find.go Outdated Show resolved Hide resolved
pkg/querier/vcs/source/find.go Show resolved Hide resolved
pkg/querier/vcs/source/find_go.go Outdated Show resolved Hide resolved
@cyriltovena cyriltovena merged commit 75160cf into main Feb 19, 2024
19 checks passed
@cyriltovena cyriltovena deleted the feat/github-api branch February 19, 2024 14:06
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.

3 participants