Skip to content

Support pprof profiling feature - #13502

Merged
wu-sheng merged 80 commits into
apache:masterfrom
JophieQu:feat/pprof
Oct 25, 2025
Merged

Support pprof profiling feature#13502
wu-sheng merged 80 commits into
apache:masterfrom
JophieQu:feat/pprof

Conversation

@JophieQu

@JophieQu JophieQu commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

This PR introduces a new pprof profiling analysis feature for Go services in SkyWalking.
It enables on-demand performance profiling of Go applications through SkyWalking’s UI, including CPU, Heap, Block, Mutex, Goroutine, ThreadCreate, and Allocs events.

  • If this is non-trivial feature, paste the links/URLs to the design doc.
  • Update the documentation to include this new feature.
  • Tests(including UT, IT, E2E) are added to verify the new feature.
  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

Comment thread oap-server/server-starter/src/main/resources/bydb.yml Outdated
Comment thread oap-server/server-starter/src/main/resources/application.yml Outdated
}
}


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove empty lines.

mrproliu
mrproliu previously approved these changes Oct 22, 2025
@@ -0,0 +1,107 @@
# Go App Profiling

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file should be linked from doc menu.


Go App Profiling uses the Pprof for sampling

Pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).
pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).

pprof is a project name. They don't use capital first letter, ref to https://github.com/google/pprof

Pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).

It is delivered to the agent in the form of a task, allowing it to be enabled or disabled dynamically.
When service encounters performance issues (cpu usage, memory allocation, etc.), Pprof task can be created.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
When service encounters performance issues (cpu usage, memory allocation, etc.), Pprof task can be created.
When service encounters performance issues (CPU usage, memory allocation, etc.), pprof task can be created.

Please fix nits in your words.

Comment thread docs/en/setup/backend/backend-go-app-profiling.md
Comment thread docs/en/changes/changes.md Outdated
* Self Observability: add `metrics_aggregation_queue_used_percentage` and `metrics_persistent_collection_cached_size` metrics for the OAP server.
* Optimize metrics aggregate/persistent worker: separate `OAL` and `MAL` workers and consume pools. The dataflow signal drives the new MAL consumer,
the following table shows the pool size,driven mode and queue size for each worker.
* Support pprof profiling feature.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* Support pprof profiling feature.
* Support the go agent(0.7.0 release) bundled pprof profiling feature.

mrproliu
mrproliu previously approved these changes Oct 24, 2025
mrproliu
mrproliu previously approved these changes Oct 24, 2025

@wu-sheng wu-sheng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some nits.

* pprof taskId
*/
private String taskId;
// Type of profiling (CPU/Heap/Block/Mutex/Goroutine/Threadcreate/Allocs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment format is not consistent, please fix this.

Comment thread docs/en/changes/changes.md Outdated
* Self Observability: add `metrics_aggregation_queue_used_percentage` and `metrics_persistent_collection_cached_size` metrics for the OAP server.
* Optimize metrics aggregate/persistent worker: separate `OAL` and `MAL` workers and consume pools. The dataflow signal drives the new MAL consumer,
the following table shows the pool size,driven mode and queue size for each worker.
* Support the go agent(0.7.0 release) bundled pprof profiling feature.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You injected the change logs into a wrong place move it to the last line of oap changes section.


### Go App Profiling

Go App Profiling uses the [Pprof](https://github.com/google/pprof) for sampling.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Go App Profiling uses the [Pprof](https://github.com/google/pprof) for sampling.
Go App Profiling uses the [pprof](https://github.com/google/pprof) for sampling.


Go App Profiling uses the pprof for sampling

pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pprof is bound within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).
pprof is bundled within the auto-instrument agent and corresponds to [In-Process Profiling](../../concepts-and-designs/profiling.md#in-process-profiling).

typo?

@wu-sheng
wu-sheng merged commit eabddf2 into apache:master Oct 25, 2025
176 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants