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

[DOC] Update and expand profiling types doc #3659

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ For more documentation on how to configure Pyroscope server, see [our server doc
The app UI and server are both installed and running automatically -- just start sending data!

### Grafana OSS
You can run the Explore profiles UI in Grafana by installing the plugin from the [Grafana Plugin Directory](https://grafana.com/grafana/plugins/grafana-pyroscope-app/)
You can run the Explore profiles UI in Grafana by installing the plugin from the [Grafana Plugin Directory](https://grafana.com/grafana/plugins/grafana-pyroscope-app/)

For more information, check out the [Explore Profiles README](https://github.com/grafana/explore-profiles)

Expand Down Expand Up @@ -137,7 +137,7 @@ Our documentation contains the most recent list of [supported languages] and als
Let us know what other integrations you want to see in [our issues](https://github.com/grafana/pyroscope/issues?q=is%3Aissue+is%3Aopen+label%3Anew-profilers) or in [our slack](https://slack.grafana.com).

[supported languages]: https://grafana.com/docs/pyroscope/latest/configure-client/
[profile-types-languages]: https://grafana.com/docs/pyroscope/latest/view-and-analyze-profile-data/profiling-types/#available-profiling-types
[profile-types-languages]: https://grafana.com/docs/pyroscope/latest/configure-client/profile-types/

## Credits

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/aws-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "AWS Lambda profiling extension"
menuTitle: "AWS Lambda profiling extension"
description: "Profiling AWS Lambda functions with Pyroscope"
weight: 100
weight: 500
---

# AWS Lambda profiling extension
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/configure-client/grafana-alloy/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Grafana Alloy"
menuTitle: "Grafana Alloy"
description: "Send data from your application using Grafana Alloy."
weight: 10
weight: 200
aliases:
- /docs/phlare/latest/configure-client/grafana-agent/
- ./grafana-agent # /docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/grafana-agent/
Expand All @@ -24,7 +24,7 @@ New installations should use Alloy.
The instructions in this section explain how to use Alloy.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of supported profile types.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of supported profile types.
{{< /admonition >}}

## Legacy collector, Grafana Agent
Expand Down
12 changes: 6 additions & 6 deletions docs/sources/configure-client/grafana-alloy/ebpf/_index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
title: "Profiling with eBPF with Grafana Alloy"
menuTitle: "Profiling with eBPF"
title: "Set up profiling with eBPF with Grafana Alloy"
menuTitle: "Set up profiling with eBPF"
description: "Learn about using eBPF for continuous profiling for performance optimization."
weight: 20
aliases:
- /docs/phlare/latest/configure-client/language-sdks/ebpf/
- /docs/pyroscope/next/configure-client/language-sdks/ebpf
---

# Profiling with eBPF with Grafana Alloy
# Set up profiling with eBPF with Grafana Alloy

eBPF is an advanced technology embedded into the Linux kernel. It stands for enhanced [Berkeley Packet Filter](https://en.wikipedia.org/wiki/EBPF) and revolutionizes the capability to run sandboxed code safely within the kernel space. This technology serves multiple use cases, such as networking, security, and performance monitoring without the need to alter kernel code or load additional modules.

<img src="/media/docs/pyroscope/ebpf_logo_color_on_white.png" width="100px;" alt="eBPF"/>

{{< youtube id="UX5aeL5KeZs" >}}

eBPF is an advanced technology embedded into the Linux kernel. It stands for enhanced [Berkeley Packet Filter](https://en.wikipedia.org/wiki/EBPF) and revolutionizes the capability to run sandboxed code safely within the kernel space. This technology serves multiple use cases, such as networking, security, and performance monitoring without the need to alter kernel code or load additional modules.

## Benefits and tradeoffs of using eBPF for continuous profiling

When it comes to application profiling, eBPF shines due to its high efficiency and minimal performance overhead.
When it comes to application profiling, eBPF offers high efficiency and minimal performance overhead.
eBPF enables the dynamic insertion of powerful monitoring code into live production systems.
By leveraging eBPF, developers can gain insights into application behavior, track resource usage, and detect bottlenecks in a way that traditional profiling tools cannot match.
eBPF's low overhead and fine-grained data collection make it an ideal choice for continuous, real-time profiling in performance-sensitive environments.
Expand Down
8 changes: 4 additions & 4 deletions docs/sources/configure-client/grafana-alloy/java/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Profiling Java using Grafana Alloy"
menuTitle: "Profiling Java using Alloy"
description: "Learn about using Grafana Alloy for continuous profiling Java processes for performance optimization."
title: "Set up Java profiling using Grafana Alloy"
menuTitle: "Set up Java profiling"
description: "Learn about using Grafana Alloy for continuous Java profiling processes for performance optimization."
weight: 20
---

# Profiling Java using Grafana Alloy
# Set up Java profiling using Grafana Alloy

Grafana Alloy supports Java profiling.
The collector configuration file is composed of components that are used to collect,
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/configure-client/language-sdks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Pyroscope language SDKs"
menuTitle: "Language SDKs"
description: "Send data from your application using language SDKs."
weight: 20
weight: 300
aliases:
- /docs/phlare/latest/configure-client/language-sdks/
---
Expand Down Expand Up @@ -59,7 +59,7 @@ The following languages SDKs provide support for sending profiles from your appl
</table>

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by each language.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by each language.
{{< /admonition >}}

If you're interested in integrating other ecosystems, reach out to us on [GitHub](https://github.com/grafana/pyroscope/).
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ aliases:
Our .NET Profiler is a powerful tool designed to enhance the performance analysis and optimization of .NET applications. It seamlessly integrates with Pyroscope, offering real-time insights into the resource usage and bottlenecks within your .NET codebase. This integration empowers developers to pinpoint inefficiencies, improve application speed, and ensure resource-efficient operation.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by each language.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by each language.
{{< /admonition >}}

## Supported profiling types
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/go_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pyroscope uses the standard `runtime/pprof` package to collect profiling data.
Refer to [the official documentation](https://golang.org/doc/diagnostics#profiling) for details.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by Go.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/latest/configure-client/profile-types/) for a list of profile types supported by Go.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It provides real-time insights, enabling developers to understand and optimize t
This tool is crucial for improving application responsiveness, reducing resource consumption, and ensuring top-notch performance in Java environments.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by each language.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by each language.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ aliases:
Enhance your Node.js application's performance with our Node.js Profiler. Seamlessly integrated with Pyroscope, it provides real-time insights into your application’s operation, helping you identify and resolve performance bottlenecks. This integration is key for Node.js developers aiming to boost efficiency, reduce latency, and maintain optimal application performance.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by each language.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by each language.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This combination provides unparalleled real-time insights into your Python codeb
It's an essential tool for Python developers focused on enhancing code efficiency and application speed.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by each language.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by each language.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Integrated with Pyroscope, it offers real-time performance data, allowing develo
This tool is essential for identifying performance issues, optimizing code efficiency, and enhancing the overall speed and reliability of Ruby applications.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by Ruby.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by Ruby.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In collaboration with Pyroscope, it offers real-time profiling capabilities, she
This integration is invaluable for developers seeking to enhance performance, reduce resource usage, and achieve efficient code execution in Rust applications.

{{< admonition type="note" >}}
Refer to [Available profiling types]({{< relref "../../view-and-analyze-profile-data/profiling-types#available-profiling-types" >}}) for a list of profile types supported by Rust.
Refer to [Available profiling types](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/profile-types/) for a list of profile types supported by Rust.
{{< /admonition >}}

## Before you begin
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/memory-overhead.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Pyroscope memory overhead
menuTitle: Memory overhead
description: Learn about memory overhead for the Pyroscope client.
weight: 200
weight: 600
---

# Pyroscope memory overhead
Expand Down
97 changes: 97 additions & 0 deletions docs/sources/configure-client/profile-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Profile types and instrumentation
menuTitle: Profile types and instrumentation
description: Learn about the different profiling types available in Pyroscope and
weight: 100
aliases:
- ../ingest-and-analyze-profile-data/profiling-types/
- ../view-and-analyze-profile-data/profiling-types/ # /docs/pyroscope/latest/view-and-analyze-profile-data/profiling-types/
keywords:
- pyroscope
- profiling types
- application performance
- flame graphs
---

# Profile types and instrumentation

Profiling is an essential tool for understanding and optimizing application performance. In Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application. This guide explores these types and explain their impact on your program.

Profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization.

[//]: # 'Shared content for available profile types'
[//]: # 'This content is located in /pyroscope/docs/sources/shared/available-profile-types.md'

{{< docs/shared source="pyroscope" lookup="available-profile-types.md" version="latest" >}}

Refer to [Understand profiling types and their uses in Pyroscope](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/introduction/profiling-types/) for more details about the profile types.

## Profile type support by instrumentation method

The instrumentation method you use determines which profile types are available. You can use either auto or manual instrumentation.

### Auto-instrumentation with Grafana Alloy

You can send data from your application using Grafana Alloy collector. Alloy supports profiling with eBPF, Java, and Golang in pull mode.

For more information, refer to [Configure the client to send profiles with Grafana Alloy](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/grafana-alloy/).

This table lists the available profile types based on auto instrumentation using Alloy.

| Profile type | Go (pull) | Java | eBPF |
| -------------- | --------- | ---- | --------- |
| CPU | Yes | Yes | Yes |
| Alloc Objects | Yes | Yes | |
| Alloc Space | Yes | Yes | |
| Inuse Objects | | | |
| Inuse Space | | | |
| Goroutines | Yes | | |
| Mutex Count | | | |
| Mutex Duration | | | |
| Block Count | Yes | | |
| Block Duration | Yes | | |
| Lock Count | | Yes | |
| Lock Duration | | Yes | |
| Exceptions | | | |
| Wall | | | |
| Heap | | | |

### Instrumentation with SDKs

Using the Pyroscope language SDKs lets you instrument your application directly for precise profiling. You can customize the profiling process according to your application’s specific requirements.

For more information on the language SDKs, refer to [Pyroscope language SDKs](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/language-sdks/).

This table lists the available profile types based on the language SDK.

| Profile type | Go (push) | Java | .NET | Ruby | Python | Rust | Node.js |
| -------------- | --------- | ---- | ---------- | ---- | ------ | ---- | ------- |
| CPU | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Alloc Objects | Yes | Yes | Yes | | | | |
| Alloc Space | Yes | Yes | Yes | | | | |
| Inuse Objects | Yes | | Yes (7.0+) | | | | |
| Inuse Space | Yes | | Yes (7.0+) | | | | |
| Goroutines | Yes | | | | | | |
| Mutex Count | Yes | | Yes | | | | |
| Mutex Duration | Yes | | Yes | | | | |
| Block Count | Yes | | | | | | |
| Block Duration | Yes | | | | | | |
| Lock Count | | Yes | Yes | | | | |
| Lock Duration | | Yes | Yes | | | | |
| Exceptions | | | Yes | | | | |
| Wall | | | Yes | | | | Yes |
| Heap | | | Yes (7.0+) | | | | Yes |

## Profile types supported with span profiles

Pyroscope can integrate with distributed tracing systems supporting the OpenTelemetry standard. This integration lets you link traces with the profiling data and find resource usage for specific lines of code for your trace spans.

Only CPU profile type is supported for span profiles.

The following languages are supported:

- [Go](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/trace-span-profiles/go-span-profiles/)
- [Java](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/trace-span-profiles/java-span-profiles/)
- [Ruby](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/trace-span-profiles/ruby-span-profiles/)
- [.NET](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/trace-span-profiles/dotnet-span-profiles/)
- [Python](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/trace-span-profiles/python-span-profiles/)
Loading
Loading