From 82a190198bcd6cf7c225a5e80a96d0c646dfa823 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:41:07 -0400 Subject: [PATCH] [DOC] Update and expand profiling types doc (#3659) * Update and expand profiling types doc * Fix doc validator issues * Apply suggestions from code review Co-authored-by: Bryan Huhta <32787160+bryanhuhta@users.noreply.github.com> * Share profile types list * Updates from Bryan's review * Apply suggestions from code review Co-authored-by: Marc Sanmiquel * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Bryan Huhta <32787160+bryanhuhta@users.noreply.github.com> Co-authored-by: Marc Sanmiquel --- README.md | 4 +- docs/sources/configure-client/aws-lambda.md | 2 +- .../configure-client/grafana-alloy/_index.md | 4 +- .../grafana-alloy/ebpf/_index.md | 12 +-- .../grafana-alloy/java/_index.md | 8 +- .../configure-client/language-sdks/_index.md | 4 +- .../configure-client/language-sdks/dotnet.md | 2 +- .../configure-client/language-sdks/go_push.md | 2 +- .../configure-client/language-sdks/java.md | 2 +- .../configure-client/language-sdks/nodejs.md | 2 +- .../configure-client/language-sdks/python.md | 2 +- .../configure-client/language-sdks/ruby.md | 2 +- .../configure-client/language-sdks/rust.md | 2 +- .../configure-client/memory-overhead.md | 2 +- .../sources/configure-client/profile-types.md | 97 +++++++++++++++++++ .../trace-span-profiles/_index.md | 28 +++--- .../dotnet-span-profiles.md | 20 ++-- .../configure-server/about-server-api.md | 4 +- .../continuous-profiling/_index.md | 2 +- .../profiling-types/_index.md | 40 ++------ docs/sources/introduction/profiling.md | 2 +- .../introduction/pyroscope-in-grafana.md | 2 +- .../sources/shared/available-profile-types.md | 23 +++++ docs/sources/shared/index.md | 4 + 24 files changed, 192 insertions(+), 80 deletions(-) create mode 100644 docs/sources/configure-client/profile-types.md rename docs/sources/{view-and-analyze-profile-data => introduction}/profiling-types/_index.md (64%) create mode 100644 docs/sources/shared/available-profile-types.md create mode 100644 docs/sources/shared/index.md diff --git a/README.md b/README.md index 170b3f34cc..3c668938d9 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 diff --git a/docs/sources/configure-client/aws-lambda.md b/docs/sources/configure-client/aws-lambda.md index 0df0b54c9f..627b93add5 100644 --- a/docs/sources/configure-client/aws-lambda.md +++ b/docs/sources/configure-client/aws-lambda.md @@ -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 diff --git a/docs/sources/configure-client/grafana-alloy/_index.md b/docs/sources/configure-client/grafana-alloy/_index.md index bad5f1b569..a3d2cf750b 100644 --- a/docs/sources/configure-client/grafana-alloy/_index.md +++ b/docs/sources/configure-client/grafana-alloy/_index.md @@ -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//configure-client/grafana-agent/ @@ -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//configure-client/profile-types/) for a list of supported profile types. {{< /admonition >}} ## Legacy collector, Grafana Agent diff --git a/docs/sources/configure-client/grafana-alloy/ebpf/_index.md b/docs/sources/configure-client/grafana-alloy/ebpf/_index.md index 6a19462994..38454db1ee 100644 --- a/docs/sources/configure-client/grafana-alloy/ebpf/_index.md +++ b/docs/sources/configure-client/grafana-alloy/ebpf/_index.md @@ -1,6 +1,6 @@ --- -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: @@ -8,17 +8,17 @@ aliases: - /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. 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. diff --git a/docs/sources/configure-client/grafana-alloy/java/_index.md b/docs/sources/configure-client/grafana-alloy/java/_index.md index 049630e467..cd762a3f1f 100644 --- a/docs/sources/configure-client/grafana-alloy/java/_index.md +++ b/docs/sources/configure-client/grafana-alloy/java/_index.md @@ -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, diff --git a/docs/sources/configure-client/language-sdks/_index.md b/docs/sources/configure-client/language-sdks/_index.md index c2fafc6b4e..605c3a80ef 100644 --- a/docs/sources/configure-client/language-sdks/_index.md +++ b/docs/sources/configure-client/language-sdks/_index.md @@ -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/ --- @@ -59,7 +59,7 @@ The following languages SDKs provide support for sending profiles from your appl {{< 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//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/). diff --git a/docs/sources/configure-client/language-sdks/dotnet.md b/docs/sources/configure-client/language-sdks/dotnet.md index 71962698d8..9ca0eb84a6 100644 --- a/docs/sources/configure-client/language-sdks/dotnet.md +++ b/docs/sources/configure-client/language-sdks/dotnet.md @@ -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//configure-client/profile-types/) for a list of profile types supported by each language. {{< /admonition >}} ## Supported profiling types diff --git a/docs/sources/configure-client/language-sdks/go_push.md b/docs/sources/configure-client/language-sdks/go_push.md index d7c7078012..2d4d7d1f0e 100644 --- a/docs/sources/configure-client/language-sdks/go_push.md +++ b/docs/sources/configure-client/language-sdks/go_push.md @@ -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 diff --git a/docs/sources/configure-client/language-sdks/java.md b/docs/sources/configure-client/language-sdks/java.md index 43c478b52a..41b6cf661c 100644 --- a/docs/sources/configure-client/language-sdks/java.md +++ b/docs/sources/configure-client/language-sdks/java.md @@ -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//configure-client/profile-types/) for a list of profile types supported by each language. {{< /admonition >}} ## Before you begin diff --git a/docs/sources/configure-client/language-sdks/nodejs.md b/docs/sources/configure-client/language-sdks/nodejs.md index ded7b3810f..ac9c7876a4 100644 --- a/docs/sources/configure-client/language-sdks/nodejs.md +++ b/docs/sources/configure-client/language-sdks/nodejs.md @@ -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//configure-client/profile-types/) for a list of profile types supported by each language. {{< /admonition >}} ## Before you begin diff --git a/docs/sources/configure-client/language-sdks/python.md b/docs/sources/configure-client/language-sdks/python.md index 5af4e30deb..3118e331e4 100644 --- a/docs/sources/configure-client/language-sdks/python.md +++ b/docs/sources/configure-client/language-sdks/python.md @@ -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//configure-client/profile-types/) for a list of profile types supported by each language. {{< /admonition >}} ## Before you begin diff --git a/docs/sources/configure-client/language-sdks/ruby.md b/docs/sources/configure-client/language-sdks/ruby.md index 0366ce7b42..625ef88d80 100644 --- a/docs/sources/configure-client/language-sdks/ruby.md +++ b/docs/sources/configure-client/language-sdks/ruby.md @@ -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//configure-client/profile-types/) for a list of profile types supported by Ruby. {{< /admonition >}} ## Before you begin diff --git a/docs/sources/configure-client/language-sdks/rust.md b/docs/sources/configure-client/language-sdks/rust.md index ec4af02d69..7e7697fbb0 100644 --- a/docs/sources/configure-client/language-sdks/rust.md +++ b/docs/sources/configure-client/language-sdks/rust.md @@ -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//configure-client/profile-types/) for a list of profile types supported by Rust. {{< /admonition >}} ## Before you begin diff --git a/docs/sources/configure-client/memory-overhead.md b/docs/sources/configure-client/memory-overhead.md index 0c4281a744..761505ac11 100644 --- a/docs/sources/configure-client/memory-overhead.md +++ b/docs/sources/configure-client/memory-overhead.md @@ -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 diff --git a/docs/sources/configure-client/profile-types.md b/docs/sources/configure-client/profile-types.md new file mode 100644 index 0000000000..f7c4698075 --- /dev/null +++ b/docs/sources/configure-client/profile-types.md @@ -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//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//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//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//configure-client/trace-span-profiles/go-span-profiles/) +- [Java](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/java-span-profiles/) +- [Ruby](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/ruby-span-profiles/) +- [.NET](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/dotnet-span-profiles/) +- [Python](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/python-span-profiles/) diff --git a/docs/sources/configure-client/trace-span-profiles/_index.md b/docs/sources/configure-client/trace-span-profiles/_index.md index e19197c2cf..2f47be235c 100644 --- a/docs/sources/configure-client/trace-span-profiles/_index.md +++ b/docs/sources/configure-client/trace-span-profiles/_index.md @@ -1,11 +1,11 @@ --- -title: "Linking tracing and profiling with Span Profiles" -menuTitle: "Linking traces and profiles" +title: "Link tracing and profiling with Span Profiles" +menuTitle: "Link traces and profiles" description: "Learn how to configure the client to Link tracing and profiling with span profiles." -weight: 35 +weight: 400 --- -# Linking tracing and profiling with Span Profiles +# Link tracing and profiling with Span Profiles Span Profiles are a powerful feature that further enhances the value of continuous profiling. Span Profiles offer a novel approach to profiling by providing detailed insights into specific execution scopes of applications, moving beyond the traditional system-wide analysis to offer a more dynamic, focused analysis of individual requests or trace spans. @@ -18,17 +18,21 @@ Key benefits and features: - Seamless integration: Smoothly transition from a high-level trace overview to detailed profiling of specific trace spans within Grafana’s trace view - Efficiency and cost savings: Quickly identify and address performance issues, reducing troubleshooting time and operational costs +{{< admonition type="note">}} +Span profiling is only effective on spans longer than 20ms to ensure statistical accuracy. +{{< /admonition >}} + ## Get started Select an option from the list below: - Configure Pyroscope: Begin sending profiling data to unlock the full potential of Span Profiles - Client-side packages: Easily link traces and profiles using available packages for Go, Java, Ruby, .NET, and Python - - Go: [Span profiles with Traces to profiles (Go)]({{< relref "./go-span-profiles" >}}) - - Java: [Span profiles with Traces to profiles (Java)]({{< relref "./java-span-profiles" >}}) - - Ruby: [Span profiles with Traces to profiles (Ruby)]({{< relref "./ruby-span-profiles" >}}) - - .NET: [Span profiles with Traces to profiles (.NET)]({{< relref "./dotnet-span-profiles" >}}) - - Python: [Span profiles with Traces to profiles (Python)]({{< relref "./python-span-profiles" >}}) -- Grafana Tempo: Visualize and analyze Span Profiles within the Grafana using a Tempo data source. - -To learn more, check out our product announcement blog: [Introducing Span Profiles](/blog/2024/02/06/combining-tracing-and-profiling-for-enhanced-observability-introducing-span-profiles/). + - Go: [Span profiles with Traces to profiles (Go)](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/go-span-profiles/) + - Java: [Span profiles with Traces to profiles (Java)](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/java-span-profiles/) + - Ruby: [Span profiles with Traces to profiles (Ruby)](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/ruby-span-profiles/) + - .NET: [Span profiles with Traces to profiles (.NET)](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/dotnet-span-profiles/) + - Python: [Span profiles with Traces to profiles (Python)](https://grafana.com/docs/pyroscope//configure-client/trace-span-profiles/python-span-profiles/) +- [Configure the Tempo data source in Grafana or Grafana Cloud](/docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/) to discover linked traces and profiles. + +To learn more, check out the product announcement blog: [Introducing Span Profiles](/blog/2024/02/06/combining-tracing-and-profiling-for-enhanced-observability-introducing-span-profiles/). diff --git a/docs/sources/configure-client/trace-span-profiles/dotnet-span-profiles.md b/docs/sources/configure-client/trace-span-profiles/dotnet-span-profiles.md index 561ba517cc..8d0320a29d 100644 --- a/docs/sources/configure-client/trace-span-profiles/dotnet-span-profiles.md +++ b/docs/sources/configure-client/trace-span-profiles/dotnet-span-profiles.md @@ -7,16 +7,16 @@ weight: 103 # Span profiles with Traces to profiles for .NET -Span Profiles represents a major shift in profiling methodology, enabling deeper analysis of both tracing and profiling data. +Span Profiles represents a shift in profiling methodology. Traditional continuous profiling provides an application-wide view over fixed intervals. In contrast, Span Profiles delivers focused, dynamic analysis on specific execution scopes within applications, such as individual requests or specific trace spans. -This shift enables a more granular view of performance, enhancing the utility of profiles by linking them directly with traces for a comprehensive understanding of application behavior. As a result, engineering teams can more efficiently identify and address performance bottlenecks. - To learn more about Span Profiles, refer to [Combining tracing and profiling for enhanced observability: Introducing Span Profiles](/blog/2024/02/06/combining-tracing-and-profiling-for-enhanced-observability-introducing-span-profiles/). ![span-profiles screenshot](https://grafana.com/static/img/docs/tempo/profiles/tempo-profiles-Span-link-profile-data-source.png) +## Supported profile types + Pyroscope integrates with distributed tracing systems supporting the [**OpenTelemetry**](https://opentelemetry.io/docs/languages/net/getting-started/) standard. This integration lets you link traces with the profiling data and find resource usage for specific lines of code for your trace spans. @@ -25,13 +25,17 @@ This integration lets you link traces with the profiling data and find resource * Because of how sampling profilers work, spans shorter than the sample interval may not be captured. {{< /admonition >}} +For a more detailed list of supported profile types, refer to [Profile types](https://grafana.com/docs/pyroscope/). + +## Before you begin + To use Span Profiles, you need to: -* [Configure Pyroscope to send profiling data]({{< relref "../../configure-client" >}}) +* [Configure Pyroscope to send profiling data](https://grafana.com/docs/pyroscope//configure-client/) * Configure a client-side package to link traces and profiles: [.NET](https://github.com/grafana/pyroscope-dotnet/tree/main/Pyroscope/Pyroscope.OpenTelemetry) * [Configure the Tempo data source in Grafana or Grafana Cloud to discover linked traces and profiles](/docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/) -## Before you begin +### Instrument your application for profiles Your applications must be instrumented for profiling and tracing before you can use span profiles. @@ -68,11 +72,11 @@ builder.Services.AddOpenTelemetry() With the span processor registered, spans created automatically (for example, HTTP handlers) and manually (`ActivitySource.StartActivity()`) have profiling data associated with them. -## View the span profiles in Grafana Tempo +## View the span profiles in Grafana -To view the span profiles in Grafana Tempo, you need to have a Grafana instance running and a data source configured to link traces and profiles. +To view the span profiles in Grafana Explore or Grafana Explore Traces, you need to have a Grafana instance running and a Tempo data source configured to link traces and profiles. -Refer to the [data source configuration documentation](https://grafana.com/docs/grafana//datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles. +Refer to the [Tempo data source configuration documentation](https://grafana.com/docs/grafana//datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles. ## Examples diff --git a/docs/sources/configure-server/about-server-api.md b/docs/sources/configure-server/about-server-api.md index 280d4e4f31..d60efc4ecc 100644 --- a/docs/sources/configure-server/about-server-api.md +++ b/docs/sources/configure-server/about-server-api.md @@ -1,6 +1,6 @@ --- description: Learn about the Pyrocope server API -menuTitle: Server HTTP API +menuTitle: Server HTTP API title: Pyroscope server HTTP API weight: 20 --- @@ -249,7 +249,7 @@ In a Kubernetes environment, a query could also look like: `process_cpu:cpu:nanoseconds:cpu:nanoseconds{namespace="dev", container="my_application_name"}` {{% admonition type="note" %}} -Refer to the [profiling types documentation]({{< relref "../view-and-analyze-profile-data/profiling-types" >}}) for more information and [profile-metrics.json](https://github.com/grafana/pyroscope/blob/main/public/app/constants/profile-metrics.json) for a list of valid profile types. +Refer to the [profiling types documentation](https://grafana.com/docs/pyroscope//configure-client/profile-types/) for more information and [profile-metrics.json](https://github.com/grafana/pyroscope/blob/main/public/app/constants/profile-metrics.json) for a list of valid profile types. {{% /admonition %}} #### `from` and `until` diff --git a/docs/sources/introduction/continuous-profiling/_index.md b/docs/sources/introduction/continuous-profiling/_index.md index 18bdbea487..3036098af0 100644 --- a/docs/sources/introduction/continuous-profiling/_index.md +++ b/docs/sources/introduction/continuous-profiling/_index.md @@ -2,7 +2,7 @@ title: When to use continuous profiling menuTitle: When to use continuous profiling description: Discover the benefits of continuous profiling and its role in modern application performance analysis. -weight: 20 +weight: 200 keywords: - pyroscope - phlare diff --git a/docs/sources/view-and-analyze-profile-data/profiling-types/_index.md b/docs/sources/introduction/profiling-types/_index.md similarity index 64% rename from docs/sources/view-and-analyze-profile-data/profiling-types/_index.md rename to docs/sources/introduction/profiling-types/_index.md index c8b84f2a83..8f01e31470 100644 --- a/docs/sources/view-and-analyze-profile-data/profiling-types/_index.md +++ b/docs/sources/introduction/profiling-types/_index.md @@ -2,11 +2,9 @@ title: Understand profiling types and their uses in Pyroscope menuTitle: Understand profiling types description: Learn about the different profiling types available in Pyroscope and how to effectively use them in your application performance analysis. -weight: 30 -aliases: - - ../ingest-and-analyze-profile-data/profiling-types/ +weight: 300 keywords: - - pyroscope + - profiles - profiling types - application performance - flame graphs @@ -20,34 +18,16 @@ Profiling is an essential tool for understanding and optimizing application perf In Pyroscope, profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization. -For information on auto-instrumentation and supported language SDKs, refer to [Configure the client]({{< relref "../../configure-client" >}}). - -### Available profiling types - -Various languages support different profiling types. -Pyroscope supports the following profiling types: - -| Profile Type | Go | Java | .NET | Ruby | Python | Rust | Node.js | eBPF (Go) | eBPF (Python)| -|--------------------|-------|-------|------------|-------|--------|-------|---------|-----------|--------------| -| CPU | Yes | Yes | 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 | | | | | | | -| Heap | | | | | | | Yes | | | +[//]: # 'Shared content for available profile types' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/available-profile-types.md' -## CPU profiling +{{< docs/shared source="pyroscope" lookup="available-profile-types.md" version="latest" >}} + +Refer to the Profile types tables for information on supported profile types based on instrumentation method. - +For information on auto-instrumentation and supported language SDKs, refer to [Configure the client](https://grafana.com/docs/pyroscope/latest/configure-client/). + +## CPU profiling CPU profiling measures the amount of CPU time consumed by different parts of your application code. High CPU usage can indicate inefficient code, leading to poor performance and increased operational costs. diff --git a/docs/sources/introduction/profiling.md b/docs/sources/introduction/profiling.md index 892ed9740d..36ca42323b 100644 --- a/docs/sources/introduction/profiling.md +++ b/docs/sources/introduction/profiling.md @@ -2,7 +2,7 @@ title: Profiling fundamentals menuTitle: Profiling fundamentals description: Discover the benefits of continuous profiling and its role in modern application performance analysis. -weight: 20 +weight: 100 keywords: - pyroscope - continuous profiling diff --git a/docs/sources/introduction/pyroscope-in-grafana.md b/docs/sources/introduction/pyroscope-in-grafana.md index a0ce2b3aad..3e59d0c0cc 100644 --- a/docs/sources/introduction/pyroscope-in-grafana.md +++ b/docs/sources/introduction/pyroscope-in-grafana.md @@ -2,7 +2,7 @@ title: Pyroscope and profiling in Grafana menuTitle: Pyroscope in Grafana description: Learn about how you can use profile data in Grafana. -weight: 200 +weight: 400 keywords: - Pyroscope - Profiling diff --git a/docs/sources/shared/available-profile-types.md b/docs/sources/shared/available-profile-types.md new file mode 100644 index 0000000000..c0336467f6 --- /dev/null +++ b/docs/sources/shared/available-profile-types.md @@ -0,0 +1,23 @@ +--- +headless: true +description: Shared file for available profile types. +--- + +[//]: # 'This file documents the available profile types in Pyroscope.' +[//]: # 'This shared file is included in these locations:' +[//]: # '/pyroscope/docs/sources/configure-client/profile-types.md' +[//]: # '/pyroscope/docs/sources/introduction/profiling-types.md' +[//]: # +[//]: # 'If you make changes to this file, verify that the meaning and content are not changed in any place where the file is included.' +[//]: # 'Any links should be fully qualified and not relative: /docs/grafana/ instead of ../grafana/.' + +Pyroscope supports these profile types: + +* CPU (CPU time, wall time) +* Memory (allocation objects, allocation space, heap) +* In use objects and in-use space +* Goroutines +* Mutex count and duration +* Block count and duration +* Lock count and duration +* Exceptions \ No newline at end of file diff --git a/docs/sources/shared/index.md b/docs/sources/shared/index.md new file mode 100644 index 0000000000..79fffb20f0 --- /dev/null +++ b/docs/sources/shared/index.md @@ -0,0 +1,4 @@ +--- +description: No description necessary for a shared file index. +headless: true +--- \ No newline at end of file