-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tempo-mixin: add Makefile and CI check (#957)
* tempo-mixin: add Makefile and CI check * Install jsonnet-bundler * Install jsonnet-bundler (attempt 2) * Install jsonnet-bundler (attempt 3) * Install Jsonnet * Install Jsonnet (attempt 2) * Install Jsonnet (attempt 3) * Install Jsonnet (attempt 4) * Intentionally modify tempo-mixin without regenerating yamls * Revert "Intentionally modify tempo-mixin without regenerating yamls" This reverts commit e76761e. * Clarify you need jsonnet as well
- Loading branch information
Koenraad Verheyden
authored
Sep 14, 2021
1 parent
180e4cb
commit 78d8107
Showing
4 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,24 @@ jobs: | |
|
||
- name: Build Tempo-Query | ||
run: make tempo-query | ||
|
||
tempo-mixin: | ||
name: Check tempo-mixin | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.16 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Install jsonnet & jsonnet-bundler | ||
run: | | ||
brew install jsonnet | ||
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected] | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check tempo-mixin | ||
run: make tempo-mixin-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.PHONY: all check install dashboards alerts rules | ||
|
||
all: dashboards alerts rules | ||
|
||
check: all | ||
git diff --exit-code -- yamls/ | ||
|
||
install: | ||
jb install | ||
|
||
dashboards: install | ||
jsonnet -J vendor -S dashboards.jsonnet -m yamls | ||
|
||
alerts: install | ||
jsonnet -J vendor -S alerts.jsonnet > yamls/alerts.yaml | ||
|
||
rules: install | ||
jsonnet -J vendor -S rules.jsonnet > yamls/rules.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
Dashboards, rules and alerts are in the `yamls` folder. Use them directly in Prometheus & Grafana to monitor Tempo. | ||
# tempo-mixin | ||
|
||
To generate dashboards with this mixin use: | ||
Dashboards, rules and alerts are in the [`yamls`](./yamls) folder. Use them directly in Prometheus & Grafana to monitor Tempo. | ||
|
||
```console | ||
jb install && jsonnet -J vendor -S dashboards.jsonnet -m yamls | ||
``` | ||
### Build | ||
|
||
To generate alerts, use: | ||
```console | ||
jsonnet -J vendor -S alerts.jsonnet > yamls/alerts.yaml | ||
``` | ||
To regenerate dashboards, rule and alerts, run `make all`. | ||
|
||
This requires [jsonnet](https://jsonnet.org/) and [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler) to be installed, install these with the following commands: | ||
|
||
To generate recording rules, use: | ||
```console | ||
jsonnet -J vendor -S rules.jsonnet > yamls/rules.yaml | ||
brew install jsonnet | ||
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected] | ||
``` |