Grafana Tempo includes a useful tempo-cli, but installing it directly with go install github.com/grafana/tempo/cmd/tempo-cli@latest does not work reliably.
The upstream module still resolves to v1.5.0 through Go's module versioning rules, and that release has replace directives in go.mod. Go rejects versioned installs from modules that need those replacements. Newer Tempo releases have the same practical problem for this use case.
This repo extracts the CLI into a small standalone module so it can be installed like a normal Go command:
go install github.com/ximyro/tempo-cli@latestThe code is based on Grafana Tempo v2.10.7.
tempo-cli --help
tempo-cli list --help
tempo-cli query api trace-id --helpThe CLI keeps Tempo's command structure and uses Tempo-compatible config sections where commands need a Tempo config file.
Most files are copied from cmd/tempo-cli. The local changes are limited to packaging:
- The module path is
github.com/ximyro/tempo-cli. - The root package is
main, sogo install github.com/ximyro/tempo-cli@latestworks. - The module has no
replacedirectives. - A small local config shim replaces the dependency on Tempo's full server app config.
Source baseline:
- Repository: https://github.com/grafana/tempo
- Release:
v2.10.7 - Original path:
cmd/tempo-cli
This repository is licensed under AGPL-3.0-only, matching Grafana Tempo's default project license.
See: