grafana/packages/grafana-flamegraph
github-actions[bot] 82e922a48c
Actionlint / Lint GitHub Actions files (push) Has been cancelled Details
Backend Code Checks / Validate Backend Configs (push) Has been cancelled Details
Backend Unit Tests / Detect whether code changed (push) Has been cancelled Details
CodeQL checks / Analyze (actions) (push) Has been cancelled Details
CodeQL checks / Analyze (go) (push) Has been cancelled Details
CodeQL checks / Analyze (javascript) (push) Has been cancelled Details
Lint Frontend / Detect whether code changed (push) Has been cancelled Details
golangci-lint / lint-go (push) Has been cancelled Details
Verify i18n / verify-i18n (push) Has been cancelled Details
End-to-end tests / Detect whether code changed (push) Has been cancelled Details
Frontend tests / Detect whether code changed (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (1/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (2/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (3/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (4/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (5/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (6/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (7/8) (push) Has been cancelled Details
Integration Tests / Sqlite (${{ matrix.shard }}) (8/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (1/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (2/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (3/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (4/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (5/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (6/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (7/8) (push) Has been cancelled Details
Integration Tests / MySQL (${{ matrix.shard }}) (8/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (1/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (2/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (3/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (4/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (5/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (6/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (7/8) (push) Has been cancelled Details
Integration Tests / Postgres (${{ matrix.shard }}) (8/8) (push) Has been cancelled Details
publish-technical-documentation-release / sync (push) Has been cancelled Details
Reject GitHub secrets / reject-gh-secrets (push) Has been cancelled Details
Run dashboard schema v2 e2e / dashboard-schema-v2-e2e (push) Has been cancelled Details
Shellcheck / Shellcheck scripts (push) Has been cancelled Details
Swagger generated code / Verify committed API specs match (push) Has been cancelled Details
Dispatch sync to mirror / dispatch-job (push) Has been cancelled Details
Trivy Scan / trivy-scan (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (1/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (2/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (3/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (4/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (5/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (6/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (7/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana (${{ matrix.shard }}) (8/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (1/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (2/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (3/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (4/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (5/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (6/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (7/8) (push) Has been cancelled Details
Backend Unit Tests / Grafana Enterprise (${{ matrix.shard }}) (8/8) (push) Has been cancelled Details
Backend Unit Tests / All backend unit tests complete (push) Has been cancelled Details
Lint Frontend / Lint (push) Has been cancelled Details
Lint Frontend / Typecheck (push) Has been cancelled Details
Lint Frontend / Betterer (push) Has been cancelled Details
End-to-end tests / Build & Package Grafana (push) Has been cancelled Details
End-to-end tests / Build E2E test runner (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (--flags="--env DISABLE_SCENES=true", e2e/old-arch/dashboards-suite, dashboards-suite (old arch)) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (--flags="--env DISABLE_SCENES=true", e2e/old-arch/panels-suite, panels-suite (old arch)) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (--flags="--env DISABLE_SCENES=true", e2e/old-arch/smoke-tests-suite, smoke-tests-suite (old arch)) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (--flags="--env DISABLE_SCENES=true", e2e/old-arch/various-suite, various-suite (old arch)) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (e2e/dashboards-suite, dashboards-suite) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (e2e/panels-suite, panels-suite) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (e2e/smoke-tests-suite, smoke-tests-suite) (push) Has been cancelled Details
End-to-end tests / ${{ matrix.suite }} (e2e/various-suite, various-suite) (push) Has been cancelled Details
End-to-end tests / A11y test (push) Has been cancelled Details
End-to-end tests / All E2E tests complete (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (1) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (2) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (3) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (4) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (5) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (6) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (7) (push) Has been cancelled Details
Frontend tests / Unit tests (${{ matrix.chunk }} / 8) (8) (push) Has been cancelled Details
Frontend tests / All frontend unit tests complete (push) Has been cancelled Details
Integration Tests / All backend integration tests complete (push) Has been cancelled Details
Release: 11.6.5 (#109577)
* Update changelog

* Update version to 11.6.5

---------

Co-authored-by: grafana-delivery-bot[bot] <grafana-delivery-bot[bot]@users.noreply.github.com>
2025-08-12 21:42:23 -05:00
..
src [release-11.6.3] FlameGraph: Fix bug for function names that conflict with JavaScript object prototype properties (#106624) 2025-06-16 13:31:11 +01:00
CHANGELOG.md
LICENSE_APACHE2
README.md FlameGraph: Add prop to keep focused items when the profile data changes (#98356) 2025-01-20 12:34:48 +02:00
package.json Release: 11.6.5 (#109577) 2025-08-12 21:42:23 -05:00
project.json Build: Nx improvements (#88341) 2024-10-15 14:25:45 +02:00
rollup.config.ts Build: Reduce repetition in rollup configs (#93916) 2025-02-25 09:11:09 +01:00
tsconfig.build.json
tsconfig.json React: Use new JSX transform (#88802) 2024-06-25 12:43:47 +01:00

README.md

Grafana Flamegraph component

@grafana/flamegraph is currently in BETA.

This is a Flamegraph component that is used in Grafana and Pyroscope web app to display profiles.

Usage

Currently this library exposes single component Flamegraph that renders whole visualization used for profiling which contains a header, a table representation of the data and a flamegraph.

import { Flamegraph } from '@grafana/flamegraph';

<FlameGraph
  getTheme={() => createTheme({ colors: { mode: 'dark' } })}
  data={dataFrame}
  extraHeaderElements={
    <Button onClick={() => {}} variant="secondary">
      Download
    />
  }
  stickyHeader
  vertical
/>

Props

Name Type Description
data DataFrame DataFrame with the profile data. Optional, if missing or empty the flamegraph is not rendered
stickyHeader boolean Whether the header should be sticky and be always visible on the top when scrolling.
getTheme () => GrafanaTheme2 Provides a theme for the visualization on which colors and some sizes are based.
onTableSymbolClick (symbol: string) => void Interaction hook that can be used to report on the interaction. Fires when user click on a name in the table.
onViewSelected (view: string) => void Interaction hook that can be used to report on the interaction. Fires when user changes the view to show (table/graph/both)
onTextAlignSelected (align: string) => void Interaction hook that can be used to report on the interaction. Fires when user changes the text align.
onTableSort (sort: string) => void Interaction hook that can be used to report on the interaction. Fires when user changes the teble sorting.
extraHeaderElements React.ReactNode Elements that will be shown in the header on the right side of the header buttons. Useful for additional functionality.
vertical boolean If true the flamegraph will be rendered on top of the table.
keepFocusOnDataChange boolean If true any focused block will stay focused when the profile data changes. Same for the sandwich view.
DataFrame schema

The dataFrame needs to have the following fields:

Name Type Description
name string The name of the node.
labels string[] The labels of the node.
level number The nesting level of the node.
value number The total value of the node.
self number The self value of the node.
valueRight number The total value of the node in the right profile. Optional, if present will show a diff version of the flamegraph.
selfRight number The self value of the node in the right profile. Optional, if present will show a diff version of the flamegraph.