For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/dashboards/widgets/profiling_flame_graph.md. A documentation index is available at /llms.txt.

Profiling Flame Graph Widget

Overview

Profiling Flame Graph

The profiling 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

Graph your data section in the profiling flame graph widget configuration

Graph your data

  1. In the search field, scope your profiling data with tags. For example, host, container_name, service, env, or version.
  2. In the Show menu, select a profile type. The available profile types depend on the language.
  3. In the by menu, select the frame granularity, such as method or line.
  4. Use the color by and sort menus to select how the frames are shaded and ordered.
  5. 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

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 when you create the widget.

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

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

This widget can be used with the Dashboards API. See the widget JSON schema definition.

Further Reading