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.
Thank you for your interest in contributing to the Tempo data source for Grafana! We welcome contributions from the community.
Feel free to browse open issues or open a new one. For more general guidance, see Grafana's Contributing Guide.
This project adheres to the Grafana Code of Conduct. By participating, you are expected to uphold this code.
- Git
- Go (see go.mod for the minimum required version)
- Mage
- Node.js LTS
- npm (see package.json for the minimum required version)
- Docker
-
Install dependencies:
npm install
-
Build plugin in development mode and watch for changes:
npm run dev
-
Build plugin in production mode:
npm run build
-
Run frontend tests:
npm run test:ci
-
Build the backend binaries:
mage -v
npm run server starts a local Tempo instance and a Grafana instance with the plugin pre-provisioned:
npm run serverThe local stack mirrors grafana/grafana's devenv/docker/blocks/tempo setup so the
plugin always has trace data to query during development:
| Service | Image | What it does | Host port |
|---|---|---|---|
tempo |
grafana/tempo:latest |
Trace backend (OTLP gRPC/HTTP, Jaeger HTTP, query) | 3200, 4317, 4318, 14268 |
prometheus |
prom/prometheus:latest |
Receives Tempo's metrics-generator remote_write | 9090 |
db |
grafana/tns-db:9c1ab38 |
TNS demo app — emits Jaeger traces via JAEGER_ENDPOINT |
8000 |
app |
grafana/tns-app:9c1ab38 |
TNS demo app | 8001 |
loadgen |
grafana/tns-loadgen:9c1ab38 |
Drives traffic against app so traces flow continuously |
8002 |
Tempo is reachable at http://localhost:3200 and accepts OTLP traces on ports 4317
(gRPC) / 4318 (HTTP). The TNS apps push traces over Jaeger to tempo:14268, and Tempo's
metrics-generator (service-graphs, span-metrics, local-blocks) remote-writes to
Prometheus so the Service Graph and span-metrics views in the Tempo datasource have data
out of the box. Both datasources are pre-provisioned (Tempo is default, Prometheus
backs the Service Graph and exemplar trace IDs link back to Tempo).
npm run server
npm run e2eOr, to install Playwright browsers first:
npx playwright install --with-deps
npm run server
npm run e2eYou need commit access to the repository to publish a release.
- Update the version number in
package.json. - Update
CHANGELOG.mdwith the changes included in the release. - Open a PR with the changes and merge it.
- Follow the release process described here.