This directory contains Phlare datasource and the FlameGraph panel.
To be able to test both in Grafana you have to set up your environment in a specific way.
- Checkout grafana/grafana#52057 in Grafana repo.
- In grafana repo packages/grafana-data/package.json, change
"@grafana/schema": "9.1.0-pre",
to"@grafana/schema": "9.0.4",
. We will link @grafana/data later on and the9.1.0-pre
version would not be recognized from Phlare repo
Create a links in your Grafana plugin directory so Grafana will lead the plugins on startup.
cd $GRAFANA_REPO/data/plugins
ln -s $PHLARE_REPO/grafana/flamegraph
ln -s $PHLARE_REPO/grafana/phlare-datasource
cd $PHLARE_REPO/grafana/flamegraph
yarn link grafana/packages/grafana-data
this will change theresolutions
part in package.json TODO: check if this can be relative path or how to prevent rewriting this all the time.yarn install
yarn build
oryarn watch
cd $PHLARE_REPO/grafana/phlare-datasource
yarn install
yarn build
oryarn watch
mage -v
orbra run
bra run
will also reload the plugin in your running grafana instance, if you don't use it restart Grafana if it was already running to pick up new plugin state.