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

How to use pprof extension for profiling #31781

Open
mmynk opened this issue Mar 15, 2024 · 3 comments
Open

How to use pprof extension for profiling #31781

mmynk opened this issue Mar 15, 2024 · 3 comments
Labels

Comments

@mmynk
Copy link

mmynk commented Mar 15, 2024

Component(s)

extension/pprof

Describe the issue you're reporting

I am trying to use the pprof extension in an OpenTelemetry collector.

I have added the following to my config otelcol.yaml:

extensions:
  pprof:
  pprof/1:
    endpoint: "127.0.0.1:1777"
    block_profile_fraction: 3
    mutex_profile_fraction: 5
    save_to_file: "cpu.pprof"

However, I am not seeing anything at that endpoint. Also the following command errors out:

$ go tool pprof http://localhost:1777/debug/pprof/profile\?seconds\=30

Fetching profile over HTTP from http://localhost:1777/debug/pprof/profile?seconds=30
http://localhost:1777/debug/pprof/profile?seconds=30: Get "http://localhost:1777/debug/pprof/profile?seconds=30": dial tcp 127.0.0.1:1777: connect: connection refused
failed to fetch any source profiles

I am sure I am missing something but being inexperienced with using profilers, I am not sure what. Do I need to ListenAndServe manually? Would appreciate any guidance.

@mmynk mmynk added the needs triage New item requiring triage label Mar 15, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mmynk
Copy link
Author

mmynk commented Mar 18, 2024

/label help-wanted @MovieStoreGuy

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants