---
title: Profiling Flame Graph Widget
description: Visualize resource consumption across profiled code paths.
breadcrumbs: Docs > Dashboards > Widgets > Profiling Flame Graph Widget
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Profiling Flame Graph Widget

## Overview{% #overview %}

{% image
   source="https://docs.dd-static.net/images/dashboards/widgets/profiling_flame_graph/profiling_flame_graph_2.ada899026f2f386006e91170e311b18c.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/dashboards/widgets/profiling_flame_graph/profiling_flame_graph_2.ada899026f2f386006e91170e311b18c.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Profiling Flame Graph" /%}

The [profiling flame graph](https://docs.datadoghq.com/profiler/profile_visualizations.md#flame-graph) visualizes stack traces collected by Continuous Profiler. Each frame represents a unit of code, such as a method or line. The width of a frame represents its share of the selected profile metric, and the frames on the next row represent code called by the frame above. Use the widget to identify resource-intensive code paths across your profiled applications.

## Setup{% #setup %}

{% image
   source="https://docs.dd-static.net/images/dashboards/widgets/profiling_flame_graph/profiling_flame_graph_config_2.6d95a9abe81cbf02522fb2582f751f8a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/dashboards/widgets/profiling_flame_graph/profiling_flame_graph_config_2.6d95a9abe81cbf02522fb2582f751f8a.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Graph your data section in the profiling flame graph widget configuration" /%}

### Graph your data{% #graph-your-data %}

1. In the search field, scope your profiling data with tags. For example, `host`, `container_name`, `service`, `env`, or `version`.
1. In the Show menu, select a profile type. The [available profile types](https://docs.datadoghq.com/profiler/profile_types.md) depend on the language.
1. In the by menu, select the frame granularity, such as method or line.
1. Use the color by and sort menus to select how the frames are shaded and ordered.
1. Use the scope sections to refine the flame graph:
   - Scope to methods: Select the methods to include. The name of this section changes based on the granularity selected in the by menu.
   - Scope to endpoints: Filter to a specific endpoint. Select `per Minute by Endpoint` to view total resource consumption or `per Endpoint Call` to view resource consumption per request.

### Set time preferences{% #set-time-preferences %}

Select Global dashboard time to use the dashboard's timeframe, or select Custom time to set a timeframe for the widget.

**Note**: Notebooks retain flame graph data for one year when the widget uses a fixed Custom time range. The range must be within the [8-day profiling data retention period](https://docs.datadoghq.com/data_security/data_retention_periods.md) when you create the widget.

### Add a title and description{% #add-a-title-and-description %}

Give your graph a title or leave the box blank for the suggested title. You can also add an optional description. Click Save.

## Interact with the widget{% #interact-with-the-widget %}

Hover over a frame to view its profile values. Select a frame to focus on its code path. To investigate the profile in more detail, click the open in full page icon in the upper-right corner of the flame graph.

## API{% #api %}

This widget can be used with the **[Dashboards API](https://docs.datadoghq.com/api/latest/dashboards.md)**. See the [widget JSON schema definition](https://docs.datadoghq.com/dashboards/graphing_json/widget_json.md).

## Further Reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Learn about Profile visualizations](https://docs.datadoghq.com/profiler/profile_visualizations.md)
- [Building Dashboards using JSON](https://docs.datadoghq.com/dashboards/graphing_json.md)
