Continuous profiling is now GA

Last updated:

Filter and Group Profiles

Filter profiling workloads, group time-series measurements by attributes, and narrow code views with stack and frame filters.
ControlWherePurpose
Filter profiles...Above the metrics chartRestrict profiles by their attributes.
Sum byBeside Profile type, or inside each comparison querySplit the metrics chart into series by attribute values.
Group byFlame graph toolbarChange the grouping of the code visualization.
Samples group byFlame chart toolbarOrganize samples into separate timeline groups.
Add filterCode visualization toolbarKeep or drop whole stacks, or filter individual frames.

Filter profiles by workload

  1. Click Filter profiles..., or use Shift+F.
  2. Select an available attribute, an operator, and the value to match.
  3. Add further conditions as needed.

Use attributes present in your profiles. For Kubernetes data, useful choices include k8s.namespace.name, k8s.deployment.name, and k8s.pod.name. For example, filter to a namespace before investigating one pod within it. See Filtering for the shared filter controls.

Split the metrics chart with Sum by

  1. Open Sum by.
  2. Search for an attribute key.
  3. Select one or more keys. Press Space to toggle a selection and Enter to submit it.

Sum by attribute selector with Kubernetes keys and keyboard controls

Select k8s.pod.name to compare pods. In the On-CPU screenshot, each series shows a pod's CPU consumption. The legend identifies each series by its attribute value. Set Sum by to None for the combined All samples series.

CPU consumption split into series by Kubernetes pod name

To group the code views, use Group by in the flame graph or Samples group by in the flame chart. See Inspect Samples over Time for timeline grouping.

Filter call stacks and frames

Click Add filter in the visualization toolbar to choose a preset or use Build a filter.

Code filter menu with runtime presets, Stack filter and Frame filter modes, and frame metadata fields

Choose the filter mode before choosing the field:

  • Stack filter: Keep or drop whole call stacks. For example, keep stacks involving a function or binary to preserve their call context.
  • Frame filter: Filter individual frames without discarding the whole stack.

The menu shows Function name, System name, Binary / executable name, Build ID, Source file, Frame type, Line number, Column number, and Memory address. Select a field and complete the condition in the filter editor. Available metadata depends on the profiler's output.

For example, use a stack filter on Source file that matches your repository's paths to reduce the view to your own code. Use a stack filter on Function name to focus on a compression path, or a frame filter to hide runtime internals.

To reuse filters, save them in a view with Save as. See Save an investigation view.

Note

Code-view filters only change what you see. They do not change ingestion or delete stored profiles.

Use preset filters

The preset menu includes:

PresetPurpose shown in the menu
Go runtime expected off-CPUExclude expected Go runtime blocking functions.
Rust expected off-CPUExclude expected Rust runtime blocking functions.
Hide V8 internalsExclude Node.js and V8 internal functions.
Hide CUDA internalsExclude CUDA and NVIDIA GPU driver internal functions.
Hide Python internalsExclude Python interpreter internal functions.

Expand Show 4 more presets in the pictured menu for the remaining choices. Use presets for the runtime you are investigating. Disable them when you need to inspect the runtime code itself.

Further Reading