Important
All commits must be signed (GPG, SSH, or S/MIME) to be merged into this repository. Pull requests with unsigned commits will need to be re-committed with signatures before they can be merged.
- Node.js (v24 or later)
- Go (latest stable version)
- npm (v11.18.0 or later)
- Docker (for the recommended development workflow, and required to build the backend at all — see below)
The backend links against zenoh-c via cgo, so it can't be
cross-compiled the way the old MQTT client could. The Dockerfile (.config/Dockerfile) downloads the
correct zenoh-c release and builds the backend inside a container matching the target platform. Building
the backend directly on your host (outside Docker) requires manually downloading a zenoh-c "standalone"
release for your platform and pointing CGO_CFLAGS/CGO_LDFLAGS at it — see the backend-builder stage in
.config/Dockerfile for the exact steps. Building the frontend (npm run build) has no such requirement.
- Clone the repository
- Install dependencies:
npm install - Build and run everything (frontend + native backend) via Docker:
npm run server
The recommended way to develop is with Docker Compose, which builds the frontend and the native Zenoh backend and starts a pre-configured Grafana instance with the plugin baked in:
npm run server
The plugin (frontend bundle and backend binary) is baked into the image at build time, not bind-mounted
from the host, since the backend is a cgo binary tied to the container's platform. This means every
change — frontend or backend — requires re-running npm run server to rebuild the image before it shows
up; there's no live-reload here. npm run dev (webpack watch) and npm run typecheck/lint/test are
still useful for a fast frontend inner loop, but you'll need to rebuild the image to see changes running
in Grafana.
You'll need a running Zenoh router (zenohd) reachable from the Grafana container to see live data;
point the data source's Endpoint setting at it. If the router runs on your host rather than in this
compose file, use host.docker.internal instead of localhost in the endpoint.
After making your changes, ensure checks pass:
npm run typecheck # Check TypeScript types
npm run lint # Lint the Typescript code
npm run test:ci # Run tests
npm run spellcheck # Run spellcheck
mage test # Run Go tests
mage lint # Lint Go code
If you've added new functionality, please add appropriate tests.
src/- Frontend TypeScript/React codepkg/- Backend Go codezenoh/- Zenoh client implementationplugin/- Grafana plugin implementationprotoc/- Protobuf message definitions and generated code
Most contributors should use
npm run serverinstead. Docker Compose is the recommended development setup — it builds both the frontend and the native Zenoh backend and starts a pre-configured Grafana instance with no manual setup required.
This section is for the specific case where you already have a Grafana installation running (in a
container or VM matching the platform you built for) and want to load the locally-built plugin into it. If
that does not describe your situation, use npm run server instead.
Build the image and extract the plugin directory from it:
docker build -f .config/Dockerfile -t zenoh-datasource-build .
docker create --name zenoh-datasource-extract zenoh-datasource-build
docker cp zenoh-datasource-extract:/var/lib/grafana/plugins/grafana-zenoh-datasource ./dist
docker rm zenoh-datasource-extract
Copy the resulting dist/ directory into your Grafana instance's plugins directory, e.g.
/var/lib/grafana/plugins/grafana-zenoh-datasource.
Local builds are not signed, so you must explicitly permit the plugin in grafana.ini:
[plugins]
allow_loading_unsigned_plugins = grafana-zenoh-datasourceRestart the Grafana service, then open the Grafana UI and navigate to Administration → Plugins to confirm the Zenoh datasource appears and is enabled.
If you are creating a PR, ensure to run npx changeset from your branch. Provide the details accordingly. It will create *.md file inside ./.changeset folder. Later during the release, based on these changesets, package version will be bumped and changelog will be generated.
To create a new release, execute npx changeset version. This will update the Changelog and bump the version in package.json file. Commit those changes.