Skip to content

Commit

Permalink
Merge pull request #4955 from newrelic/Flame-graph-improvements
Browse files Browse the repository at this point in the history
fix(flame graph): improve flame graph docs
  • Loading branch information
mmfred committed Nov 18, 2021
2 parents c36b4d8 + 6b20a36 commit 53ff8aa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,24 @@ The details panel for each JVM provides several critical views:
**[one.newrelic.com](https://one.newrelic.com) > Explorer > (select service) > Realtime Profiling Java > (select JVM)**: You can see details for each JVM.
</figcaption>

## Identify resource intensive code paths using flamegraphs [#flamegraph]
## Identify resource-intensive code paths with flame graphs [#flamegraph]

<Callout variant="important">
The flamegraph feature is only compatible with the [New Relic Java agent JFR service](https://github.com/newrelic/newrelic-jfr-core/blob/main/README.md#new-relic-java-agent-jfr-service) usage scenario.
The flame graph feature is only compatible with the [New Relic Java agent JFR service](https://github.com/newrelic/newrelic-jfr-core/blob/main/README.md#new-relic-java-agent-jfr-service) usage scenario.
</Callout>

Use flamegraphs to identify the Java classes and methods that are most frequently executed in your application code. By using flamegraphs to optimize the hot spots in your code you can reduce resource consumption and increase your application’s overall performance.
A "flame graph" is a way of visualizing the call tree. Each block in the graph represents a function. The more CPU time and memory resources a method consumes, the wider that block is.

![Screenshot showing a flamegraph example.](./images/jfr_flamegraphs.png "jfr_flamegraphs.png")
Use flame graphs to identify the Java classes and methods that are most frequently executed in your application code. By using flame graphs to optimize the hot spots in your code, you can reduce resource consumption and increase your application’s overall performance.

Here are some details about the flame graph colors:

* Light color: methods from a Java SE package.
* Dark color: methods from other libraries.

![Screenshot of New Relic Java flame graph.](./images/jfr_flamegraphs.png "Screenshot of New Relic Java flame graph")
<figcaption>
**[one.newrelic.com](one.newrelic.com/) > Explorer > (select service) > Realtime Profiling Java > (select JVM)**: You can see details for each JVM, including flamegraphs.
**[one.newrelic.com](one.newrelic.com/) > Explorer > (select service) > Realtime Profiling Java > (select JVM)**: You can see details for each JVM, including flame graphs.
</figcaption>


Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Our Pixie integration gives you the best of both worlds: Pixie’s fast and simp

You’ll get visibility into HTTP services using golden signals, HTTP transactions, database transactions, distributed tracing, and JVM metrics. You can operate, debug, and scale your Kubernetes clusters based on the information you learn about how your clusters and services are running. Using the New Relic [Explorer](/docs/new-relic-one/use-new-relic-one/core-concepts/new-relic-explorer-view-performance-across-apps-services-hosts/), you can see key metrics and events at every level, starting with the cluster, and diving down into namespaces, deployments, and pods. You can quickly spot anomalous behavior, and where it’s happening.

And then dive deeper using embedded visualizations of your Pixie data. Quickly identify hot spots with [Flamegraph](#flamegraph). On the [Live debugging with Pixie tab](#live-debugging), answer questions like what SQL requests your app is making or which services are talking to each other.
And then dive deeper using embedded visualizations of your Pixie data. Quickly identify hot spots with a [flame graph display](#flamegraph). On the [Live debugging with Pixie tab](#live-debugging), answer questions like what SQL requests your app is making or which services are talking to each other.

<Callout variant="important">
Auto-Telemetry with Pixie leverages [Community Cloud with Pixie](http://pixielabs.ai/), a separate platform from New Relic One. Use of Community Cloud with Pixie is subject to separate [terms of service](https://pixielabs.ai/terms).
Expand All @@ -48,11 +48,11 @@ Containers might be listed for up to four hours after they get decommissioned.

You can query the Pixie data in New Relic One and create dashboards for at-a-glance monitoring. Find the data model and sample queries [here](/docs/integrations/kubernetes-integration/understand-use-data/auto-telemetry-pixie-data-model).

## Investigate usage spikes with Flamegraph [#flamegraph]
## Investigate usage spikes using the flame graph [#flamegraph]

![flamegraph](./images/flamegraph.png "Pixie flamegraph")
![Pixie flame graph](./images/flamegraph.png "Pixie flame graph")

Debugging is orders of magnitude easier when you can quickly see what your application is doing. Flamegraph, a Pixie always-on visualization, requires no instrumentation, redeploying, or recompiling. It works for compiled languages like Go, C+, Rust, to name a few. And at a glance, Flamegraph tells you what functions your application is spending time on and where you have hot spots. Flamegraph is especially useful for hierarchical resource use, like disk usage and CPU utilization. For more information on how to read Flamegraph, see [the Pixie documentation](https://docs.pixielabs.ai/tutorials/profiler#reading-the-flamegraph).
Debugging is orders of magnitude easier when you can quickly see what your application is doing. The Pixie flame graph display requires no instrumentation, redeploying, or recompiling. It works for compiled languages like Go, C+, Rust, to name a few. And at a glance, the flame graph tells you what functions your application is spending time on and where you have hot spots. Flame graphs are especially useful for hierarchical resource use, like disk usage and CPU utilization. For more information on how to read a flame graph, see [the Pixie flame graph docs](https://docs.pixielabs.ai/tutorials/profiler#reading-the-flamegraph).


## Debug live [#live-debugging]
Expand Down

0 comments on commit 53ff8aa

Please sign in to comment.