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

add export processor option to profile scraper #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MistaTwista
Copy link

proposal for a feature #5

the main idea here is to add options for Profile scraper with something like middleware handlers that can read raw bytes from profile and make their side effects with it.
So now i'm able to add S3 (or any other) exporter if I use cluster-agent as a module.

We can add few more code to add configurable exporters out of the box. Like if we add connection string to s3 bucket somewhere in a good place - add profile processor and push profile to s3. For those who want to have raw pprof files but don't want to use agent as a module.
It also give ability to show proof url to download profile from coroot ui.

What do you think?

@MistaTwista MistaTwista marked this pull request as ready for review December 4, 2024 17:43
@def def self-requested a review December 16, 2024 11:54
@def
Copy link
Member

def commented Dec 16, 2024

@MistaTwista thanks for the contribution! I see what you're aiming for, but I don’t think integrating external systems directly at the cluster agent level is the best idea. I believe it would be better to implement an API on the Coroot side to export profiles in the pprof format. This approach would also benefit users who want to analyze application profiles using tools like the built-in go tool pprof ....

Let me know what you think!

@MistaTwista
Copy link
Author

it would be better to implement an API on the Coroot side to export profiles in the pprof format. This approach would also benefit users who want to analyze application profiles using tools like the built-in go tool pprof ....

Looks doable, that was my first thinking approach. But I stopped at doing the simplest thing I can find, just to start from some point. And also this part of a processing is confuses me a bit. Is this lossless operation? Is there any plans to optimize something that might break getting profile function for users? My first approach using access to raw data.

But nevertheless, changes in API would also simplify the process of adding some "link to download" for profile in UI. Because if we do it here we must also do some implicit connection between module of agent and the coroot itself throught S3 or other storages.

I'll see what I can do and if it will work for the main point of getting PGO compiler optimizations and local profile inspecting.

Thanks for feedback 👍

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.

2 participants