Skip to content

Commit

Permalink
refactor: autogenerate metrics docs
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Clucas <[email protected]>
  • Loading branch information
Joibel committed Nov 26, 2024
1 parent f22ae3b commit a71b913
Show file tree
Hide file tree
Showing 28 changed files with 1,529 additions and 431 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ lint: server/static/files.go $(GOPATH)/bin/golangci-lint

# for local we have a faster target that prints to stdout, does not use json, and can cache because it has no coverage
.PHONY: test
test: server/static/files.go
test: server/static/files.go util/telemetry/metrics_list.go util/telemetry/attributes.go
go build ./...
env KUBECONFIG=/dev/null $(GOTEST) ./...
# marker file, based on it's modification time, we know how long ago this target was run
Expand Down Expand Up @@ -632,8 +632,12 @@ clean:
go clean
rm -Rf test-results node_modules vendor v2 v3 argoexec-linux-amd64 dist/* ui/dist

# swagger
# Built telemetry files
util/telemetry/metrics_list.go util/telemetry/attributes.go docs/metrics.md: util/telemetry/builder/builder.go util/telemetry/builder/values.yaml
@echo Rebuilding telemetry files
cd util/telemetry/builder && go run .

# swagger
pkg/apis/workflow/v1alpha1/openapi_generated.go: $(GOPATH)/bin/openapi-gen $(TYPES)
# These files are generated on a v3/ folder by the tool. Link them to the root folder
[ -e ./v3 ] || ln -s . v3
Expand Down
338 changes: 216 additions & 122 deletions docs/metrics.md

Large diffs are not rendered by default.

58 changes: 24 additions & 34 deletions util/telemetry/attributes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a71b913

Please sign in to comment.