Skip to content

Add pprof extension #7073

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

Merged
merged 2 commits into from
Apr 25, 2025
Merged

Conversation

denysvitali
Copy link
Contributor

Which problem is this PR solving?

Currently it's not possible to profile Jaeger. This makes it hard to find bugs, memory leaks or problems in the running application. It looks like this was somehow supported in Jaeger v1 (I found references there) and was mentioned in config.yaml - but it didn't work out of the box because the extension was missing.

Description of the changes

This PR adds the pprof

How was this change tested?

Using all-in-one.yaml and connecting to localhost:17777

Checklist

Signed-off-by: Denys Vitali <[email protected]>
@denysvitali denysvitali requested a review from a team as a code owner April 25, 2025 09:51
@dosubot dosubot bot added the performance label Apr 25, 2025
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Who is the audience for this? A regular user will not be profiling jaeger code, only someone who wants to make changes and already has access to source code and can build jaeger. I don't mind adding the extension to the binary, but I don't like enabling it automatically in all-in-one, potentially causing port conflicts that the user has no way of turning off. I would only add it to config.yaml which is not shipped as part of the jaeger binary.

@denysvitali
Copy link
Contributor Author

Yes, good point, no need for this to be enabled by default.

My use case (today) was to find out why Jaeger takes 30m to start when Badger is enabled - and the only way for me to debug this is to enable pprof.

@yurishkuro
Copy link
Member

let's move the config change from all-in-one to cmd/jaeger/config.yaml

@denysvitali
Copy link
Contributor Author

Done. Wdyt?

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (e22fa5d) to head (f97c87d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7073      +/-   ##
==========================================
+ Coverage   96.01%   96.02%   +0.01%     
==========================================
  Files         355      355              
  Lines       20993    20995       +2     
==========================================
+ Hits        20156    20161       +5     
+ Misses        630      628       -2     
+ Partials      207      206       -1     
Flag Coverage Δ
badger_v1 9.96% <ø> (ø)
badger_v2 2.06% <ø> (ø)
cassandra-4.x-v1-manual 14.99% <ø> (ø)
cassandra-4.x-v2-auto 2.05% <ø> (ø)
cassandra-4.x-v2-manual 2.05% <ø> (ø)
cassandra-5.x-v1-manual 14.99% <ø> (ø)
cassandra-5.x-v2-auto 2.05% <ø> (ø)
cassandra-5.x-v2-manual 2.05% <ø> (ø)
elasticsearch-6.x-v1 19.93% <ø> (ø)
elasticsearch-7.x-v1 20.01% <ø> (ø)
elasticsearch-8.x-v1 20.18% <ø> (ø)
elasticsearch-8.x-v2 2.06% <ø> (ø)
grpc_v1 11.52% <ø> (ø)
grpc_v2 2.06% <ø> (ø)
kafka-3.x-v1 10.24% <ø> (ø)
kafka-3.x-v2 2.06% <ø> (ø)
memory_v2 2.06% <ø> (ø)
opensearch-1.x-v1 20.06% <ø> (ø)
opensearch-2.x-v1 20.06% <ø> (ø)
opensearch-2.x-v2 2.06% <ø> (ø)
query 2.06% <ø> (ø)
tailsampling-processor 0.56% <ø> (ø)
unittests 94.79% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro yurishkuro added this pull request to the merge queue Apr 25, 2025
Merged via the queue into jaegertracing:main with commit c20079e Apr 25, 2025
58 checks passed
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?

Currently it's not possible to profile Jaeger. This makes it hard to
find bugs, memory leaks or problems in the running application. It looks
like this was somehow supported in Jaeger v1 (I found references there)
and was mentioned in `config.yaml` - but it didn't work out of the box
because the extension was missing.

## Description of the changes

This PR adds the
[pprof](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/pprofextension/README.md)

## How was this change tested?

Using `all-in-one.yaml` and connecting to `localhost:17777`

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Denys Vitali <[email protected]>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
## Which problem is this PR solving?

Currently it's not possible to profile Jaeger. This makes it hard to
find bugs, memory leaks or problems in the running application. It looks
like this was somehow supported in Jaeger v1 (I found references there)
and was mentioned in `config.yaml` - but it didn't work out of the box
because the extension was missing.

## Description of the changes

This PR adds the
[pprof](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/pprofextension/README.md)

## How was this change tested?

Using `all-in-one.yaml` and connecting to `localhost:17777`

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Denys Vitali <[email protected]>
Signed-off-by: amol-verma-allen <[email protected]>
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.

2 participants